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:

  1. 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.
  2. 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:

  1. Perform the command steps that you want to store.
  2. Type CommandHistory to open the separate command history window.
  3. Right-click and select Copy History.
  4. Open a text editor.
  5. Paste the command steps into the editor program.
  6. Save the file as an .scr file.

Running a Script File

To run a script file:

  1. Click Tools > Run Script (or type LoadScript).
  2. Select a script and click Open.


Command: LoadScript

Menu: Tools > Run Script

Related Topics

Pausing Script Execution

Resuming Script Execution

Repeating a Script

Hiding the Command History Window