The Macro system of WordPerfect 5.2



This document describes new and improved features in the WordPerfect Macro system. It includes new features and changes since WordPerfect 5.1. This version of this document also includes the undocumented features and commands.



Document Change Log

9/9/97 JDan 1.0 - Document created to document the macro system of WordPerfect 5.2.





Quick Overview of WordPerfect 5.1 Macro Compatibility



This section provides a quick overview of things you may need to do to your WordPerfect 5.1 macros to make them work in the WordPerfect 5.1 macro system. The next section, Modified and Improved Commands and Language Features, provides more extensive details.





Dialog Statements



Statements have been added to allow dialogs to be created and displayed from a macro.





Obsolete Commands and Language Features



In a future release of the macro system, there are some commands that may or may not be supported. Users are encouraged to replace these commands with their functional equivalents (if any) as soon as possible. For backward macro compatibility, these commands will continue to be supported, but they will no longer be documented in the command browser or in the macro help information. These commands may be eliminated in some future release.

...





Modified and Improved Commands and Language Features



This section describes changes to existing commands and, where applicable, incompatibilities that may arise with old (WordPerfect 5.1 and prior) macros. In this section, "..." indicates places where existing capabilities have not been changed.

...





New Commands and Language features



This section describes new commands and language features which have been added.

new reserved words



new reserved keywords

New keywords have been added to the macro language. These keywords are reserved words and may not be used as variable or label names in macros. In addition to these new reserved keywords, the name of any new commands are also considered reserved words, since those names also cannot be used as variable or label names. (However, just because a new reserved keyword is on this list, does not imply that there is a new command or feature by that name that can be accessed.) The new reserved keywords that have been added are:

Several new commands have been added, which are now reserved words, but they do not need to be listed separately. See below for the list of new commands.

...



AppActivate (<Window>numeric)



AppExecute (<Command>string)



AppLocate (<Variable>variable; <Title>string)



DDEExecute (<Conversation>numeric; <Command>string)



DDEInitiate (<Conversation>variable; <Service>string; <Topic>string)



DDEPoke (<Conversation>numeric; <ItemName>string; <Data>any)



DDERequest (<Variable>variable; <Conversation>numeric; <ItemName>string)



DDETerminate (<Conversation>numeric)



DDETerminateAll ()



DialogAddCheckBox (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Text>string; <Variable>variable)



DialogAddColorWheel (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Variable>variable)



DialogAddComboBox (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric; <Variable>variable; <DataLimit>numeric)



DialogAddCounter (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Format>numeric; <Variable>variable; <MinValue>numeric; <MaxValue>numeric; <StepValue>numeric)



DialogAddEditBox (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric; <Variable>variable; <DataLimit>numeric)



DialogAddFileNameBox (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric; <Variable>variable; <DefDir>string; <Template>string)



DialogAddFrame (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric)



DialogAddGroupBox (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Title>string)



DialogAddHLine (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Length)



DialogAddHotSpot (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric)



DialogAddIcon (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <IconName>string; <ModuleLink>numeric)



DialogAddListBox (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric; <Variable>variable)



DialogAddListItem (<DialogId>string; <ControlId>string; <String>string)



DialogAddPopupButton (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Variable>variable)



DialogAddPushButton (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric; <Text>string)



DialogAddRadioButton (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Text>string; <Variable>variable)



DialogAddScrollBar (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric; <Variable>variable; <MinValue>numeric; <MaxValue>numeric)



DialogAddText (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric; <Text>string)



DialogAddViewer (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <FileName>string)



DialogAddVLine (<DialogId>string; <ControlId>string; <HPos>numeric; <VPos>numeric; <Length>numeric)



DialogDefine (<DialogId>string; <HPos>numeric; <VPos>numeric; <Width>numeric; <Height>numeric; <Style>numeric; <Title>string)



DialogDestroy (<DialogId>string)



DialogDisplay (<DialogId>string; <ControlId>string)



SendKeys (<KeyCode>string; 0)



SendKeys Wait (<KeyCode>string; 0)