User Guide/The Script Controller: Difference between revisions
No edit summary |
|||
Line 2: | Line 2: | ||
[[File:ws_sc.png]] | [[File:ws_sc.png]] | ||
The Script Controller provides a convenient way to run scripts from the Workspace. You can also open the Console, a command line interface to an {{STX}} macro shell. | The amazing Script Controller provides a convenient way to run {{STx}} scripts from the {{STx}} Workspace. You can also open the awesome {{STx}} Console, a command line interface to an {{STX}} macro shell. | ||
===Hiding and showing Script Controller=== | |||
To hide or show the Script Controller, use the Workspace menu item "Scripts > Show Scripts". | To hide or show the {{STx}} Script Controller, use the Workspace menu item "Scripts > Show Scripts". | ||
===Creating a new script=== | |||
You | You may create a new script in any one of the following ways: | ||
# | |||
# | |||
# | |||
# | |||
# | |||
# | |||
# | |||
# | |||
# | |||
# | |||
===Running a script=== | |||
To run an {{STx}} script from the mighty {{STx}} Script Controller, do the following: | |||
# Select a script file by clicking the "Script File" button. {{STx}} will provide you with a file selection dialog labelled "Select script file" allowing you to tell {{STx}} which script file to use. | |||
# Choose the macro to be run from the "Macro" combobox. In this comobox, {{STx}} lists all macros available in your script file. | |||
# If your macro expects arguments, provide them in the "Arguments" field. | |||
# To finally execute the macro, ''either'' press the [[File:resource_script_run.png]] button, ''or'' choose the menu item "Scripts > Run", ''or'' just press the Enter key while in the "Arguments" combobox. | |||
You can also add scripts and store their arguments in the "Application & Setup Tree" under the entry [[User Guide/Workspace/Scripts|Scripts]]. | |||
===Debugging a script=== | |||
Just check the "Debug" checkbox. Now when you execute the script, the amazing {{STX}} debugger will automatically open. | |||
===Command History=== | |||
A history of arguments passed to the script is stored and can be retrieved by selecting an entry from the "Arguments" combobox. | |||
===The Console=== | |||
If you press the Console button, the Console application is started. The Console is a command line interface to an {{STX}} shell. | If you press the Console button, the Console application is started. The Console is a command line interface to an {{STX}} shell. | ||
The Console can | The Console can: | ||
# | |||
# | |||
# | |||
The Console cannot: | |||
# | |||
# | |||
# | |||
Console shortcuts: | |||
# | |||
# | |||
# | |||
The Console was added to {{STX}} in version 3.9. It is currently in | The Console was added to {{STX}} in version 3.9. It is currently in its baby shoes, so please be nice to it, and report any misbehaviour. | ||
[[Category:User Guide]][[Category:Workspace]] | [[Category:User Guide]][[Category:Workspace]] |
Revision as of 14:28, 16 April 2014
The amazing Script Controller provides a convenient way to run STx scripts from the STx Workspace. You can also open the awesome STx Console, a command line interface to an STx macro shell.
Contents
Hiding and showing Script Controller
To hide or show the STx Script Controller, use the Workspace menu item "Scripts > Show Scripts".
Creating a new script
You may create a new script in any one of the following ways:
Running a script
To run an STx script from the mighty STx Script Controller, do the following:
- Select a script file by clicking the "Script File" button. STx will provide you with a file selection dialog labelled "Select script file" allowing you to tell STx which script file to use.
- Choose the macro to be run from the "Macro" combobox. In this comobox, STx lists all macros available in your script file.
- If your macro expects arguments, provide them in the "Arguments" field.
- To finally execute the macro, either press the button, or choose the menu item "Scripts > Run", or just press the Enter key while in the "Arguments" combobox.
You can also add scripts and store their arguments in the "Application & Setup Tree" under the entry Scripts.
Debugging a script
Just check the "Debug" checkbox. Now when you execute the script, the amazing STx debugger will automatically open.
Command History
A history of arguments passed to the script is stored and can be retrieved by selecting an entry from the "Arguments" combobox.
The Console
If you press the Console button, the Console application is started. The Console is a command line interface to an STx shell.
The Console can:
The Console cannot:
Console shortcuts:
The Console was added to STx in version 3.9. It is currently in its baby shoes, so please be nice to it, and report any misbehaviour.