Writing and Running Script Files
Use the LoadScript command to execute a sequence of commands from a script file.
Writing a Script File
You can write a script file with any text editor or word processing program that is able to store ASCII text format (without the addition of any formatting information).
To create a script file:
- Enter the commands and instructions and their corresponding input values into the file in the same order in that the instructions are to execute.
Command execution takes place line-by-line or instruction-by-instruction when separated by a space. Either an end of line or space character is interpreted as confirmation of the previous entry.
- Save the file in plain text format as an .scr file.
These lines define a script that sketches a Circle at the coordinates 5,5 with a radius of 10 drawing units:
An equivalent is (note the spaces):
Circle 5,5 10
Using the clipboard
You can write script files with the Copy and Copy History commands.
The command history window contains a list of program commands and data entries that you made during the program session. The history lets you reference and reconstruct the procedures you used.
To write script files by copying command history:
- Perform the command steps that you want to store.
- Type CommandHistory to open the separate command history window.
- Right-click and select Copy History.
- Open a text editor.
- Paste the command steps into the editor program.
- Save the file as an .scr file.
Running a Script File
To run a script file:
- Click Tools > Run Script (or type LoadScript).
- Select a script and click Open.
Menu: Tools > Run Script