Playing macros

You can play a Quattro Pro macro from the menu or by using the macro buttons on a customized toolbar. For information about creating customized toolbars, see “Working with toolbars.”

Playing a PerfectScript macro is similar to playing a Quattro Pro macro. However, PerfectScript macros cannot be used for startup or exit macros.

You can have a play a macro each time you open or close a notebook. For example, Quattro Pro can enter the current date and time when you open a notebook. You can also play a macro each time you start Quattro Pro.

You may want to have Quattro Pro launch a macro whenever a user opens a particular notebook. When you open a file that contains a PerfectScript or Quattro Pro native startup macro, the macro launches as soon as you open the file. For your convenience, Quattro Pro displays a message alerting you that the file contains this kind of macro. Quattro Pro can have the same macro startup every time a user launches Quattro Pro. You can also design an exit macro to make sure any ongoing operations are completed so you can exit the notebook without problems.


To play a Quattro Pro macro

Wordperfect Quattro Pro btnbacktotopproc Playing macros
1.
 
Click Tools Wordperfect Quattro Pro onestep Playing macros Macro Wordperfect Quattro Pro onestep Playing macros Play.
2.
 
Enable the Quattro Pro macro option.
3.
 
Type the location of the macro in the Location box.

Wordperfect Quattro Pro tip Playing macros

 
You can also play a Quattro Pro macro by pressing Alt + F2.
 
If the macro is in another notebook, use full linking syntax to specify the macro location (for example, [LIBRARY]A:C26).

To play a PerfectScript macro

Wordperfect Quattro Pro btnbacktotopproc Playing macros
1.
 
Click Tools Wordperfect Quattro Pro onestep Playing macros Macro Wordperfect Quattro Pro onestep Playing macros Play.
2.
 
Enable the PerfectScript macro option.
3.
 
Type a filename in the filename box.

Wordperfect Quattro Pro tip Playing macros

 
You can play a PerfectScript macro by pressing Alt + F2.

To play a startup or exit macro in a notebook

Wordperfect Quattro Pro btnbacktotopproc Playing macros
1.
 
Select the first cell of a macro.
2.
 
Click Insert Wordperfect Quattro Pro onestep Playing macros Name Wordperfect Quattro Pro onestep Playing macros Name cells.
3.
 
In the Name box, type one of the following:
_NBSTARTMACRO — plays a startup macro when opening the notebook
_NBEXITMACRO — plays an exit macro when closing the notebook
4.
 
Click Add.
5.
 
Click Close.

Wordperfect Quattro Pro note Playing macros

 
If a notebook is linked to other notebooks, a Links dialog box displays when you open the notebook. To ensure that _NBSTARTMACRO plays correctly in a notebook that contains links, begin the macro with {ESC}. This cancels the Links dialog box.

To assign an existing macro as the startup macro

Wordperfect Quattro Pro btnbacktotopproc Playing macros
1.
 
Click Tools Wordperfect Quattro Pro onestep Playing macros Settings.
2.
 
In the list of categories, double-click Workspace, Application, and click Macro.
3.
 
Type a new name in the Startup box.

Wordperfect Quattro Pro note Playing macros

 
If you modify the default startup macro name, existing macros named will no longer play automatically. For example, if you set the startup name to AUTOSTART, macros named do not play automatically; they must be renamed AUTOSTART.

To assign a macro to play automatically when you start Quattro Pro

Wordperfect Quattro Pro btnbacktotopproc Playing macros
1.
 
Click Tools Wordperfect Quattro Pro onestep Playing macros Settings.
2.
 
In the list of categories, double-click Workspace, Application, and click File options.
3.
 
Type the name of the macro in the Autoload file box.

Wordperfect Quattro Pro tip Playing macros

 
You can also locate the macro by clicking the Browse Wordperfect Quattro Pro pgx folder Playing macros button in the Autoload file box.

To stop a macro while it is playing

Wordperfect Quattro Pro btnbacktotopproc Playing macros
 
Click Ctrl + BREAK.

Wordperfect Quattro Pro note Playing macros

 
If Ctrl + BREAK has been disabled with {BREAKOFF}, you cannot stop the macro. If you need to use {BREAKOFF} in the macro, add it as a last step after debugging the macro.

Playing macros