Running Scripts Directly
The Script Manager Commandline
You can run a script directly from the script manager by passing the name of the script on the command line. For example:
ScriptManager.exe -script="full path to script.eaf" -prompt=yes -password=password -var=If the script manager is not running yet it will be started and that script will be run one time. It should be noted that all scripts that are set to automatic will also be run when the script manager starts up. If a script manager is already running then a message will be set to it to run the specific script and then the new instance of the script manager will shut down.
The Script Runner
The Easy Automation Script Runner is the program that actually runs scripts. When you run an automation script from the Script Editor or from the Script Manager the script this program is started and processes the script.
Command Line
ScriptRunner.exe -script='/path/to/script.eaf' -prompt='yes' -password='script password' -var='variableName=variableValue' -var='variableName=variableValue' ...'-script' is the full path to the script that you want to run.
'-password' is the password needed by the script if the script is password protected.
'-prompt' if yes and a password is not supplied and the script needs a password the user will be prompted for it. If no then the script will exit.
'-var' is a variable you want to define in the script, where name is the variable name, and value will be the variable value (the same thing as adding var name = 'value'; to the code.)
Remember if you run a script directly using this application that includes a trigger, or a loop that never ends then it is possible that the Script Runner will never exit. Either make sure the script has a second trigger in it that will end the script (like a hotkey trigger that called the System.exit() function) or that the automation script will end naturally. It is always safer to run the scripts from with-in the Script Manager or Script Editor.
Script Runner Return Values
The script runner will return a code based on the results of the script.
0 if the script worked normally
1 if the script had an error in it
9999 if the script runner encounted a problem
The script runner can also return another code if the System.exit( code ) call is made. 'code' is the number that will be returned.