Running REXX Scripts

One of the most important tips we can give you to save time and headaches is:

If you have a script that interacts with an existing project have it SAVE THE PROJECT to a temporary file as step one, before the script actually interacts with the image.

This will save you in the event that bugs in the script accidentally delete/move/change any objects in that HUGE and COMPLEX project you just created and haven't saved yet!

Additional information on how to run REXX scripts is detailed in the Photo>Graphics PRO Users Guide.

The methods for manually starting REXX scripts within are:

To have scripts start automatically when Photo>Graphics PRO is started you can pass the full path and name and parameters of a script from the command line (or PARAMETERS field of a Program Reference Icon).

Example 1: Start a script automatically

    PGPRO ..\SCRIPTS\STARFIEL.CWX

Example 2: Start a script and pass it some parameters it expects.

    PGPRO MAKEGIFS.CWX c:\bmps\*.* 100 20

When scripts are run you have the option of showing the REXX Console as they run. This allows you to use the REXX TRACE command to see the flow of the script as it runs.

The REXX Console can be made visible in 3 ways:

  1. Via the pop-up menu item FILE | SHOW REXX Console
  2. If the ALWAYS SHOW REXX CONSOLE preference setting is on
  3. Via the CW function to show the Console

The REXX console is also used for the output of any REXX SAY commands and any other output that would typically be directed to the screen in any command line REXX CMD file.

You can also use the CWMSG function to cause a message box to appear.



Error Handling

Index

Writing Scripts