Recording and editing PerfectScript macros
You can use PerfectScript macros not only with Quattro Pro, but also with other WordPerfect applications such as Presentations and WordPerfect.
PerfectScript is a command-based language that records the results of keystrokes or mouse selections rather than the keystrokes themselves. PerfectScript includes commands that direct the function of the macros. These commands let you create macros that can prompt for user input, make decisions based on conditions in a notebook, access system variables, and so on.
You can record PerfectScript macros. A recorded macro includes only product commands.
You can also type a macro in WordPerfect and play it in Quattro Pro. A typed macro can include non-recordable statements that specify how a macro performs a task. When writing this kind of macro, you specify the conditions for playing assignments, loops, and programming commands.
Once you have created a PerfectScript macro script you can create a .wcl file. The .wcl file is necessary for debugging PerfectScript macros.
In Quattro Pro you can edit a PerfectScript macro in two ways: in WordPerfect or in the PerfectScript Macro Facility.
To record a PerfectScript macro |
1.
|
|
Click Tools Macro Record.
|
2.
|
|
Enable the PerfectScript macro option.
|
3.
|
|
Type a filename in the Filename box.
|
4.
|
|
Click OK.
|
5.
|
|
Perform the actions in a task.
|
Each action is recorded and written as one or more macro commands in the macro file.
|
6.
|
|
Click Tools Macro Record.
|
•
|
|
The recording of a macro is noted by on the application bar.
|
•
|
|
You cannot record a PerfectScript macro that pauses for user input. If you want the macro to pause, edit it after recording it.
|
To pause or resume the recording of a PerfectScript macro |
•
|
|
Click Tools Macro Pause.
|
To type a PerfectScript macro |
1.
|
|
Start WordPerfect.
|
2.
|
|
Click Tools Macro Macro toolbar.
|
3.
|
|
Click the
Commands button on the Macro toolbar. |
4.
|
|
Choose a command type from the Command type list box.
|
If the command requires a parameter, choose a parameter from the Parameters list box.
|
If the command requires an enumeration, choose an enumeration from the Enumerations list box.
|
5.
|
|
Type any additional parameters or values in the Command edit box.
|
6.
|
|
Click Insert.
|
7.
|
|
Click Save & compile on the macro toolbar.
|
•
|
|
You can also type a PerfectScript macro by click Start All programs WordPerfect Office X5 Utilities PerfectScript and clicking Help Macro command browser.
|
To create a WCL file |
1.
|
|
Click Tools Macro Edit.
|
2.
|
|
Choose the drive and folder where the macro is stored.
|
3.
|
|
Double-click the filename.
|
WordPerfect opens.
|
4.
|
|
Click Options Compile with debug on the macro tools toolbar.
|
5.
|
|
Click Save & compile on the macro toolbar.
|
6.
|
|
In the PerfectScript compiler listing box, click OK.
|
•
|
|
The .wcl file defaults to the same location and name as the .wcm file.
|
•
|
|
You can open the macro tools toolbar in WordPerfect by clicking View Toolbars, and enabling the Macro tools check box in the Toolbar list.
|
To edit a PerfectScript in the PerfectScript Macro Facilit
|
1.
|
|
Click Tools Macro Edit.
|
2.
|
|
Choose the drive and folder where the macro is stored.
|
3.
|
|
Double-click the filename.
|
To edit a PerfectScript macro in WordPerfect |
1.
|
|
On the Windows taskbar, click Start All Programs WordPerfect Office X5 Utilities PerfectScript.
|
2.
|
|
Click File Edit.
|
3.
|
|
Choose a drive and folder where the file is stored.
|
4.
|
|
Double-click a filename.
|
This starts WordPerfect and displays the macro commands.
|
5.
|
|
Edit the macro.
|