AppleScript Building Blocks

AppleScript building blocks run AppleScripts. The difference between the three different types of AppleScript blocks is the manner in which they interpret or ignore the result from the script. AppleScript blocks are found in the Palette window by selecting "AppleScript" from the popup menu.

AppleScript blocks can store a script internally, or reference an external script file. When storing the script internally, ControllerMate is not dependent on external files. However, using an external script file can be helpful if the script is being edited frequently using Apple's AppleScript Editor or a similar application.

To copy the contents of an existing script file into an AppleScript building block, configure the block to reference the script file, then modify the block to store the script internally. If the script file was originally saved as text, then the source of the script will be available in ControllerMate's Inspector window. If the file was stored as a run-only script, then the building block will copy the script's data, but the original source will not be available in the Inspector window.

When the Prepare the script at startup option is enabled, the building block will prepare to run the script when ControllerMate is first loaded. This can reduce the delay before the script runs the first time. However, if the script is not stored in an executable format and sends commands to another application, the process of preparing a script may cause that other application to launch. Disable the Prepare the script at startup option if applications launch unexpectedly.

An AppleScript building block that uses the result of a script as its output value can be configured with an initial output value. That value will be used as the block's output until the script runs and reports a result.

By default, ControllerMate does not allow scripts to interact with the user when they run. To allow interaction, enable the Allow the script to interact with the user option.

Depending on the the functions they perform, scripts may take an extended amount of time to complete. While the building block waits for script to complete, it can set its output to a specific value, to an indeterminate value "---", or leave the output at its current value.


The Status tab in the Inspector window shows errors that may occur when preparing or running an AppleScript.