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 |
1.
|
|
Click Tools Macro Play.
|
2.
|
|
Enable the Quattro Pro macro option.
|
3.
|
|
Type the location of the macro in the Location box.
|
•
|
|
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 |
1.
|
|
Click Tools Macro Play.
|
2.
|
|
Enable the PerfectScript macro option.
|
3.
|
|
Type a filename in the filename box.
|
•
|
|
You can play a PerfectScript macro by pressing Alt + F2.
|
To play a startup or exit macro in a notebook |
1.
|
|
Select the first cell of a macro.
|
2.
|
|
Click Insert Name 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.
|
To assign an existing macro as the startup macro |
1.
|
|
Click Tools Settings.
|
2.
|
|
In the list of categories, double-click Workspace, Application, and click Macro.
|
3.
|
|
Type a new name in the Startup box.
|
To assign a macro to play automatically when you start Quattro Pro |
1.
|
|
Click Tools 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.
|
•
|
|
You can also locate the macro by clicking the Browse button in the Autoload file box.
|
To stop a macro while it is playing |
•
|
|
Click Ctrl + BREAK.
|
•
|
|
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.
|