There is no New Script command. Instead, to open a new script window, you use the New Window command and then send it a message to tell it that it’s a script window:
In the New Window example above, ww is a reference to the display box that is the entire window. To write to a script window, you first need to get a reference to the part of the display box that you can write to, which is called a Script Box:
Using the reference ed, you can add text, remove text, and get the text that is already there.
Use Set Text to set all the text in the script window. The following command clears all text in the Script Window and then adds aaa=3; followed by a return:
Use Append to add additional text to the end of the script window.
Use the Get Line Text command to get the text at the line of a specified line number. Use the Set Line Text command to replace a specified line of text with new text.
Use the Get Line Count command to get the total number of lines in the script. The Get Lines command returns a list of each line in the script as a string.
Use the Reformat command to automatically format a script for easier reading.
To close the script window, send the window the Close Window command, just like you can do with any JMP window.