Introduction

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

Since you're likely new to Simdify Scripting Language, you might wonder what you can accomplish using Simdify 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 Simdify Scripting Language.

Most of the UI in a Simdify application is built with Simdify 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 Simdify Scripting Language, virtually all of the commands accessible through any menu are built with Simdify 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 Simdify Scripting Language. If you're interested in learning about this, look at the section GPU Compute Series in the sidebar at the left.

Simdify Applications

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

A Simdify Application File, ending in .simdifyapp 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. Layout Application Directory. In the following image, you can see a series of files that implement a complete Simdify application. The Simdify application named Shell compiles these files into a .simdifyapp file that can be started like a regular .exe.

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

Connecting Simdify Scripting Language Documents To Applications

Simdify applications can connect to Simdify 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 Simdify scripting language macro library or a Simdify 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
Simdify Application File A Simdify application is an XML file such as Layout.simdifyapp that runs on top of Simdify.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 Simdify Scripting Language

Simdify applications have two main entry points for invoking Simdify 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 Simdify Scripting Language. By convention, these are stored in Simdify Scripting Language libraries that end with _scripts.ssl. For example, commands for <Program> node are stored in a Simdify Scripting language file called type_program_scripts.ssl.
Event Libraries Simdify 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.