Introduction

Scenome Scripting Language is a C++-like language. If you know how to write C++ or Java®, you know how to write Scenome Scripting Language. In this topic, we'll discuss some of the basic technical elements of working with Scenome Scripting Language, including how script macro libraries are connected to applications, and how script libraries are usually constructed.

Since you're likely new to Scenome Scripting Language, you might wonder what you can accomplish using Scenome Scripting Language. The answer is easy: quite a lot. In fact, you can probably do a lot more than you even need to do with Scenome Scripting Language.

Most of the UI in a Scenome application is built with Scenome Scripting Language, including the main menus, command menus, and all of the wizards. The dockbars containing the hierarchy, output window, and property sheet, are built with C++, but are accessible through the scripting system to varying degrees.

Most of the exporter system is built with Scenome Scripting Language, virtually all of the commands accessible through any menu are built with Scenome Scripting Language, and there is even nearly complete access to the platform's GPU compute features! You can allocate a shader program, bind a shader buffer, write to a shader buffer, execute GPU compute dispatch operations, and even read back the results—all in Scenome Scripting Language. If you're interested in learning about this, look at the section GPU Compute Series in the sidebar at the left.

Scenome Applications

Scenome applications are defined by XML-based shells that run on top of the Scenome Platform API infrastructure. When you start a Scenome application such as Shader.scenomeapp, Scenome.exe and its DLLs are loaded into memory. The specified UI is loaded and the associated scripts are compiled.

A Scenome Application File, ending in .scenomeapp is an XML file that contains ASCII representations of the UI, splash screen, title bar icon, default document, and script file database associated with that application.

Figure 1.1. Shader Application Directory. In the following image, you can see a series of files that implement a complete Scenome application. The Scenome application named Shell compiles these files into a .scenomeapp file that can be started like a regular .exe.

This is a picture of the folder that contains the Shader application shells.

Connecting Scenome Scripting Language Documents To Applications

Scenome applications can connect to Scenome Scripting Language libraries in only one way: through a snippet of XML called a script collection. This is just a small snippet of XML that specifies the path and filename of a Scenome scripting language macro library or a Scenome scripting language event library. If you want to modify an existing macro library or event library, you can just open the file and start writing code. (Connecting a new macro library or event library is beyond the scope of this topic. In practice though, it's very easy: you start the Shell application, open the shell you wish modify, add a command to the shell, and then rebuild it. The Shell application takes care of the rest.)

Table 1.1. Language Invocation

Element Description
Scenome Application File A Scenome application is an XML file such as Shader.scenomeapp that runs of Scenome.exe and specifies the splash screen, interface layout, and script macro library files to which the application is connected.
Script Collections A file such as v0_scripts.xml and v1_scripts.xml.

Invoking Scenome Scripting Language

Scenome applications have two main entry points for invoking Scenome Scripting Language: commands and events. There are two types of files relevant to this discussion.

Table 1.1. Language Invocation

Element Description
Macro/Command Libraries Commands in the user interface are implemented in Scenome Scripting Language. By convention, these are stored in Scenome Scripting Language libraries that end with _scripts.ssl. For example, commands for <Program> node are stored in a Scenome Scripting language file called type_program_scripts.ssl.
Event Libraries Scenome Scripting Language can also be executed for some application events. For example: you can write an event handler that fires when the application starts up, is running, or when a file is loaded.