Writing and editing macros by using PerfectScript
PerfectScript macros are the common macro language for all applications in WordPerfect Office. PerfectScript is a command-based language. When you record a macro, you record the results of keystrokes or mouse selections instead of recording the keystrokes themselves. For example, instead of recording each keystroke required to change the top margin of a page to 2” (5.1 cm), the macro records the following command:
Recording and playing macros can speed up routine tasks, but the real power of macros is tapped when product commands are used together with PerfectScript programming commands. By using product commands and programming commands, the functionality of WordPerfect Office features is combined with the customizing, decision making, and iterative capabilities of a programming language. Using programming commands also makes it possible to include the functionality of other applications.
A written macro can include non-recordable statements, which cannot be included in recorded macros, that specify how a macro performs a task. You specify conditions for playing assignments, loops, and programming commands. Writing a macro provides greater flexibility to determine function than recording a macro. You can create a macro in WordPerfect and play it in the application for which it was written.
With PerfectScript, you can combine statements to automate routine tasks and simplify large ones. You write the macro using statements, compile the macro, and play the macro.
The PerfectScript programming language consists of WordPerfect application commands and functions, and programming statements and functions. PerfectScript can do more than perform your recorded WordPerfect commands — it can extend the functionality of WordPerfect in a number of ways, such as prompting you for input, displaying messages, controlling other Corel and Windows-based applications, and performing and repeating commands. You can also build complete applications or wizards so that, if you have limited experience using WordPerfect, you can still use some of the more complex actions.
PerfectScript lets you record, play, compile, and convert macros for all WordPerfect Office applications. PerfectScript starts automatically when you record or play a macro. If you play a macro for an application that is not running, PerfectScript automatically starts the application.
Installing the Software Development Kit
The Software Development Kit (SDK) is a set of tools that lets you customize WordPerfect Office applications for commercial or business use. For information about acquiring a WordPerfect Office Software Development Kit, visit Corel Technology Partner.
The Corel Technology Partner program supports developers of complimentary products and add-ons for selected Corel products, including WordPerfect Office X5. The program is designed to help accelerate the development of third-party products and promote these products.
The SDK includes the following components:
•
|
|
documentation for the SDK
|
•
|
|
OLE automation samples
|
•
|
|
PerfectScript tools
|