To write and/or debug a script, start the Script Utility.
The Script Editor/Debugger window appears.
For a complete list of scripting commands, see “Script Command Reference” in the online help.