Editing Scripts

[ LiB ]

Editing Scripts

Once you've recorded and saved a script, you can modify it if you like.

Simple scripts can be edited with Paint Shop Pro's Script Editor. You invoke the built-in script editor either by selecting the script you want to edit in the Script toolbar and then clicking the Edit Selected Script button or by choosing F ile > Scr i pt > E dit and navigating to the script. The Script Editor dialog box is shown in Figure 12.3.

Figure 12.3. Paint Shop Pro's built-in Script Editor.

graphic/12fig03.gif


You have the option of inserting script information, including author, copyright, and description. And from within the built-in editor, you can also make simple modifications of script commands. For any of the listed commands, you have several options:

  • Uncheck any commands that you want to suppress entirely but not delete.

  • Change the setting in the drop-down list for the command from Default to either Interactive or Silent. With Interactive, the command is always run interactively, no matter what the Interactive Playback toggle is set to. With Silent, the command is always run silently, no matter what the Interactive Playback toggle is set to. With Default, the command is run interactively if the Interactive Playback toggle is on and silently if the Interactive Playback toggle is off.

  • Highlight a command's name and click the Delete button to permanently delete the command from the script.

  • Highlight a command's name and click the Edit button to change the default settings for the command. For commands that have no settings, the Edit button will be greyed out and the listing for the command will include "(NOT Editable)" after the command name.

For adding Python code that the built-in editor cannot parse or to make other hand-entered changes to your script, click the Text Editor button on the Script Editor dialog box. This calls up Notepad or another text editor that you've specified in the file locations preferences, opening the script you're editing.

Be careful if you edit a script by hand. Python pays strict attention to indenting, for example, and any inappropriate indents will yield unintended results or make the script unrunnable. We won't look at any details here. If you're interested in extensive script editing or script writing, you should consult the script writer's guide available on the Jasc site.

NOTE

graphic/p1.gif TIP

Never write a script entirely by hand, even if you're a Python expert. Instead, record a script that approximates what you want your script to do, and then edit that script. This is much easier, and yields fewer errors, than coding your script from scratch.

[ LiB ]


Paint Shop Pro 8 Power
Paint Shop Pro 8 Power!
ISBN: B001QCXEI6
EAN: N/A
Year: 2006
Pages: 125
Authors: Lori J. Davis

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net