New in PerfectScript for WordPerfect version 9 (WP Office 2000)



This document describes new and improved features in PerfectScript since Corel WordPerfect Professional Suite 8. This version of this document also includes the undocumented features and commands (as hidden text).



Document Change Log

3-29-99 JDan 1.15 - Document new commands added in version 9 before release.

1-23-99 JDan 1.14 - Add indication of which features were actually added/changed in the V8 Enterprise version [8e]. Described new enumerations for file types in the FileConvert, FileType, FileTypeExtension and FileTypeName commands. Described new changes to BIFWrite, Menu and DialogAddScrollBar commands.

12-29-98 JDan 1.13 - Describe changes to Menu and MenuList.

12-20-98 JDan 1.12 - Correct various typos.

6-23-98 JDan 1.11 - Add new region tokens.

6-19-98 JDan 1.10 - Add description of new commands, modified commands, etc.

6-18-98 JDan 1.9 - Since the Enterprise version of 8 was never released, include descriptions of changes for 8e in this document too.

2-20-98 SteveCa 1.8 - Added SetDefaultParent command.

1-6-98 SteveCa 1.7 - Open/Save dialog now remembers position/size during a session.

1-5-98 SteveCa 1.7 - New optional "Parent" parameter for FileNameDialog command.

12-10-97 SteveCa 1.6 - BIF commands restored, but to be undocumented.

12-9-97 SteveCa 1.5 - New Animate command.

12-4-97 SteveCa 1.4 - Most coach commands removed.

12-2-97 SteveCa 1.3 - BIF commands removed.

11-25-97 SteveCa 1.2 - Described new capabilities when removing source from macros; fixed descriptions of some of the "hidden" settings.

11-18-97 JDan 1.1 - Add description about changes to the version number.

11-17-97 SteveCa 1.0 - Initial creation.





Quick Overview of WordPerfect 8 Macro Compatibility



This section provides a quick overview of things that may need to be done to WordPerfect 8 macros to make them work in PerfectScript for version 9. The sections Obsolete Commands and Language Features and Modified and Improved Commands and Language Features provide more extensive details. As new commands and capabilities are added, new reserved words have also been added. A description of these new reserved words is in the section New Commands and Language features.





PerfectScript (the program--PS90.EXE)





PerfectScript User Interface Changes



[8e] A context menu is now available for the recording macro icons that display in the system tray. This context menu matches the context menu for the same macro if selected from the PerfectScript interface. Double clicking on any macro icon in the system tray, will bring up the PerfectScript user interface.



[8e] The preference settings have been regrouped and rearranged by adding a new page for the macro play settings.



[8e] A new General setting has been added that allows the display of macro icons in the Windows system tray area to be disabled.



The PerfectScript toolbar now displays three buttons that can be configured to play any macros you choose. To configure them, choose Tools, Settings, then click on the Toolbar tab and choose which macros you want associated with each of the three buttons.



You can now choose to record macros in the JavaScript language. To do so, choose Tools, Settings, then click on the Record tab and choose JavaScript as the script language.



When removing source from macros, the macros are now changed so that they can't be accidentally edited in WordPerfect In addition, you can now remove source from macros compiled for previous versions of PerfectScript.



Whenever you use the open/save dialog to choose a file, the position and size of the dialog will be recorded so that when you return to it, it will be in the same position with the same size as it was previously. The position and size are maintained only during the session.



Advanced / Hidden Features, Settings and Keystrokes in PerfectScript



The PerfectScript Macro system has a number of hidden features and settings that are not documented, and not supported. These are used primarily for internal debugging and testing, and may contain bugs. Direct access to these features and settings from the user interface of the PerfectScript (PS90) is controlled by a specific registry setting. This registry setting is:



HKEY_CURRENT_USER\Software\Corel\PerfectScript\9\Settings\"Show Advanced Settings" = 1 (DWORD value)



If this setting does not exist, or has a value of 0, then direct access is not available. When this setting does exist, with a value of 1, then additional menu items are available in PerfectScript, and additional settings are available in the "Settings" dialog. As a reminder that these are hidden features and settings, the text of these menu items is enclosed in "[ ]" symbols, and the text of the settings in the "Settings" dialog are show in italics. New advanced/hidden settings are now available in the "Settings" dialog.



This same registry setting may be toggled on/off through a command accelerator key sequence of "Control Shift Alt ENTER" in PerfectScript.



Hidden keystrokes in the PerfectScript user interface

Control Shift Alt Object Action

Control Alt F10 key Compile

Shift Alt Insert key Registered Apps

Control Shift Insert key Command Inserter 1

Control Shift Alt Insert key Command Inserter 2

Control Alt Insert key Command Inserter 3

Control Shift Alt Enter key Toggle Hidden Settings

Shift Alt Enter key Macro Info

Control Shift Alt Recent file menu item Compile

Control Shift Recent file menu item Edit

Control Alt Recent file menu item Macro Info

Control Recent file menu item Record

Shift Alt Recent file menu item Debug Compile

Shift Recent file menu item Compile

Alt Recent file menu item Debug Play

Recent file menu item Play

Del Recent file menu item Remove from recent file list

Home Recent file menu item Move to top of recent file list

Shift About menu item Display easter egg



Hidden keystrokes in the Command Inserter

Control Shift Alt Object Action

Control Shift Insert button Dump Command List (also button in advanced)

Control Shift Alt Insert button Brief Command Dump (also button in advanced)

Control Select command list item Show Return-value Enumerations (also button in advanced)



Hidden keystrokes in the Macro Interpreter

Control Shift Alt Object Action

Control Shift Alt Cancel button in "Prompt" Invoke Macro Debugger

Control Shift Alt Cancel button in "Get..." Invoke Macro Debugger

Control Shift Alt Any button in "MessageBox" Invoke Macro Debugger



Hidden preference dialog settings

The following preference settings are accessible from the "Settings" dialog of PerfectScript when the Advanced / Hidden settings are enabled:

General page

Display debug messages



Compile page

Convert commas to semicolons

Ignore trailing semicolons

Ask to overwrite current object

Ask for listing filename

Ask to overwrite listing file

Generate detailed listing

Generate opcode statistics

Allow unknown OLE objects

Save scrubber file

Display compile warnings

Display compile errors

Display compile fatal errors

Display compile message %d [not used]



Debug page

Show full routine data

Show actual variable data types

Show "Internal Variables" button

Show "Runtime Stack" button

Show "Object Code" button

Show "Load" and "Save" buttons

Display all breakpoints

Debugger startup file



Debug page 2



Play page

Run unattended

Show progress

Use new runtime error dialog

Platform version info file

PerfectFit version info file

PerfectScript version info file

Command Browser page

Use theta indexes

Show actual data types

Show all PIDs

Show all parameters

Show all enumerations

Show token ids

Show enumeration values



Non-preference dialog registry settings

All registry settings not accessible from the "Settings" dialog of PerfectScript are listed below. These settings are located in HKEY_CURRENT_USER\Software\Corel\PerfectScript\9\Settings\...



"Preferred Interface Language" = (string) "US" (default="US")

"Time Out Tkn App Launch" = (DWORD) (default = 300)

"Prompt on Tkn App Launch" = (DWORD) 1 or 0 (default=0)



"Interpreter\Show matherr Messages" = (DWORD) 1 or 0 (default=0) [not used]



"Debugger\Color For Source Code Lines" = (DWORD) 1 or 0 (default=-1)

"Debugger\Color For Source Non-Code Lines" = (DWORD) 1 or 0 (default=0x00008000)

"Debugger\Color For Source Opcode Lines" = (DWORD) 1 or 0 (default=0x00808080)

"Debugger\Color For Source Opcode Statistic Lines" = (DWORD) 1 or 0 (default=0x00c0c0c0)

"Debugger\Show Grid Lines" = (DWORD) 1 or 0 (default=1)

"Debugger\Select Entire Line" = (DWORD) 1 or 0 (default=1)

"Debugger\Debugger Toolbar Configuration" = (BINARY) (default=0)

"Debugger\Use Flat Toolbar" = (DWORD) 1 or 0 (default=1)

"Debugger\Minimize When Macro Running" = (DWORD) 1 or 0 (default=0)

"Debugger\Show Numbers in Hex" = (DWORD) 1 or 0 (default=1)

"Debugger\Show Numbers in Octal" = (DWORD) 1 or 0 (default=0)

"Debugger\Show Numbers in Binary" = (DWORD) 1 or 0 (default=0)

"Debugger\Show Last Return Value Button" = (DWORD) 1 or 0 (default=0)

"Debugger\Display Last Return Value" = (DWORD) 1 or 0 (default=0)

"Debugger\Find Case Sensitive" = (DWORD) 1 or 0 (default=0)

"Debugger\Find Whole Words Only" = (DWORD) 1 or 0 (default=0)

"Debugger\Find Start at Top" = (DWORD) 1 or 0 (default=0)

"Debugger\Find Wrap Around" = (DWORD) 1 or 0 (default=1)

"Debugger\Find Forward" = (DWORD) 1 or 0 (default=1)

"Debugger\Find Last Text" = (string) "" (default="") [not used]

"Debugger\Find Last Line" = (DWORD) 1 or 0 (default=0) [not used]

"Debugger\Show Label Table" = (DWORD) 1 or 0 (default=0)

"Debugger\Show UseFile Table" = (DWORD) 1 or 0 (default=0)

"Debugger\Show Product Table" = (DWORD) 1 or 0 (default=0)

"Debugger\Show Dialog List" = (DWORD) 1 or 0 (default=0)

"Debugger\Show Condition Handler List" = (DWORD) 1 or 0 (default=0)

"Debugger\Show MacroInfo List" = (DWORD) 1 or 0 (default=0)

"Debugger\Show Callback Queue" = (DWORD) 1 or 0 (default=0)

"Debugger\Show Macro Header Dialog" = (DWORD) 1 or 0 (default=0)





OLE Automation





Dialog Editor, and Dialog and Region Statements





Macro Debugger



[8e] The macro debugger has been significantly enhanced for this release. <features described separately>





Command Inserter



[8e] When Shift clicking (holding down the Shift key and then clicking), or help clicking (clicking first on the "?" button in the caption bar and then clicking) on a command in the Commands list box, then the item clicked on is selected, and then the command specific help is invoked for that command. In previous versions, the command specific help was invoked for whatever item was already selected before, and the item clicked on was not selected first. This meant that to get command specific help on a specific command in the Commands list box, first the desired command would have to be selected, and then the item would have to be Shift clicked or help clicked. This preselection is now combined into the Shift clicking and help clicking in order to eliminate the confusion and extra step previously required.



[8e] For most optional enumeration parameters of commands, a default value is passed when the parameter is left off (in some cases, leaving off the optional enumeration parameter performs a different function). The default enumeration values (if any) for these parameters is now displayed in bold text in the Enumerations list box. In some cases, the default value is a combination of enumerations. In this case, all enumerations that are combined to produce the default value are highlighted. In some other cases, several enumerations may be defined with the same value as synonyms for each other. In this case, all enumerations defined with the same value as the default value are highlighted.





Obsolete Commands and Language Features



In a future release of PerfectScript, 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.

[8e] AppExecuteExt

BIF...

Coach...

Coach... (removed commands)

DDEEexecuteExt

[8e] DialogAddComboBox.Style.Sort!

[8e] EnvVariableGet.EnvType.NetWare!, EnvVariableSet.EnvType.NetWare!

FileConvert.SourceFIleType.AnsiGenericWP!

FileConvert.SourceFIleType.AsciiFormatted!

FileConvert.SourceFIleType.AsciiGenericWP!

FileConvert.SourceFileType.HTML!, FileConvert.DestinationFileType.HTML!

FileConvert.SourceFIleType.PresentationsMaster!, FileConvert.DestinationFileType.PresentationsMaster!

FileConvert.SourceFIleType.PresentationsMaster3!, FileConvert.DestinationFileType.PresentationsMaster3!

FileConvert.DestinationFileType.CorelDRAW7!

FileConvert.DestinationFileType.WPMac31!

FileType.COJava, FileTypeName.FileType.COJava, FileTypeExtension.FileType.COJava!

FileType.Show!, FileTypeName.FileType.Show!, FileTypeExtension.FileType.Show!

FileTypeName.FileType.WordPerfect678!, FileTypeExtension.FileType.WordPerfect678!

FileConvert.SourceFIleType.WordPerfect678!, FileConvert.DestinationFileType.WordPerfect678!

[8e] FileNameDialog.StyleOptions.PerfectFitDialog!

[8e] MenuList

[8e] StrCheckSum



[8e] AppExecuteExt

The functionality of the AppExecute command has been extended to include the same features as the AppExecuteExt command. The AppExecuteExt command can now be replaced by AppExecute.



BIF...

Starting with version 9 the BIF commands will no longer be documented. BIF was the system used to store and access settings in version 6.x on Windows 3.x. Registry commands are now used to access settings. Although the commands will not be documented, they will continue to work. In a future release, the BIF commands will not be supported.



Coach...

The following Coach commands will continue to be supported, but will not be documented and should not be used because they will be removed in a future release: CoachMessageBox, CoachMessageBoxEx, CoachMessageBoxClose, CoachPrompt, CoachPromptClose. These commands are being supported only because they have been commonly used by macro writers in the past. As an alternative to CoachAnimate, use the new Animate command.



Coach... (removed commands)

The following Coach commands will no longer be supported and have been removed from version 9: CoachFilterAdd, CoachFilterDestroy, CoachFilterDisable, CoachFilterEnable, CoachGetRegionInfo, CoachInputControl, CoachRegister, CoachRemoveDialogFilter, CoachSetDialogFilter, CoachWaitForInputIdle.



DDEExecuteExt

The functionality of the DDEExecute command has been extended to include the same features as the DDEExecuteExt command. The DDEExecuteExt command can now be replaced by DDEExecute.



[8e] DialogAddComboBox.Style.Sort!

This enumeration has been renamed to Sorted! to be compatible with the same enumeration in DialogAddListBox.



[8e] EnvVariableGet.EnvType.NetWare! and EnvVariableSet.EnvType.NetWare!

This enumeration for these two commands was never implemented, and has been made obsolete.



FileConvert.DestinationFileType.PresentationsMaster!

FileConvert.DestinationFileType.PresentationsMaster3!

FileConvert.DestinationFileType.CorelDRAW7!

FileConvert.DestinationFileType.HTML!

FileConvert.DestinationFileType.WPMac31!

FileConvert.SourceFIleType.AnsiGenericWP!

FileConvert.SourceFIleType.AsciiFormatted!

FileConvert.SourceFIleType.AsciiGenericWP!

FileConvert.SourceFileType.HTML!

FileConvert.SourceFIleType.PresentationsMaster!

FileConvert.SourceFIleType.PresentationsMaster3!

FileType.COJava

FileTypeName.FileType.COJava!

FileTypeExtension.FileType.COJava!

These enumerations are now obsolete.



FileTypeName.FileType.WordPerfect678!, FileTypeExtension.FileType.WordPerfect678!, FileConvert.SourceFIleType.WordPerfect678!, FileConvert.DestinationFileType.WordPerfect678!

These enumerations have been renamed from WordPerfect678! to WordPerfect6789!.



[8e] FileNameDialog.StyleOptions.PerfectFitDialog!

This enumeration has been renamed to EnhancedDialog!.



FileType.Show!

FileTypeName.FileType.Show!

FileTypeExtension.FileType.Show!

These enumerations have been renamed from Show! to PresentationsShow3!.



[8e] MenuList

This command has always existed only for DOS 6.0 macro language compatibility, and will no longer be documented. The Menu command should be used instead.



StrCheckSum

This command was first added for 8e, but never documented (or shipped), and has been renamed CheckSum for version 9.





Modified and Improved Commands and Language Features



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



<version number>

/* */

[8e] AppLocate

Assert

BIFWrite

BinaryPack

FileTypeList

SortArray

[8e] Cancel

[8e] Condition

[8e] Error

[8e] ExitHandlerState

[8e] NotFound

[8e] VarrErrChk

Combinations

Permutations

Condition

[8e] DateString

DDEExecute

DDEExecuteExt

DDEInitiate

[8e] DDEPoke

[8e] DDERequest

DDETerminate

[8e] DefaultUnits

DialogAddBitmap [8e]

[8e] DialogAddCheckBox

DialogAddIcon

DialogAddScrollBar

DLLFree

DLLLoad

ElseIfPlatform

EndIfPlatform

ErrorNumber

FileConvert

[8e] FileConvertError

FileError

FileNameDialog

FilePostion

FileRead

FileSize

FileTruncate

FileType

FileTypeExtension

FleTypeName

FileWrite

FileWriteLine

FileFlushData

For

ForNext

GetFileDateAndTime

GetNumber

GetString

GetUnits

IfPlatform

[8e] MacroCompile

MacroInfo [8e]

[8e] MacroPlay

Menu

[8e] MenuList

MessageBox

macro dialogs, others prompts and dialogs

[8e] NetAddConnection

[8e] NetConnectionDlg

[8e] NetDisconnectDlg

[8e] NToC

OnCondition

OnCondition Call

OpenFile

[8e] PersistAll

Prompt

[8e] Reference

[8e] RegionGetHandle

[8e] RegionGetPosition

[8e] RegionMoveWindow

[8e] RegistryCloseKey

[8e] RegistryCreateKey

[8e] RegistryDeleteKey

[8e] RegistryDeleteValue

[8e] RegistryEnumKey

[8e] RegistryEnumValue

[8e] RegistryOpenKey

[8e] RegistryQueryKeyCount

[8e] RegistryQueryLastError

[8e] RegistryQueryValue

[8e] RegistryQueryValueCount

[8e] RegistrySetValue

SetFileDateTime

[8e] StdDev

StrMakeList

StrParseList

[8e] ValueType

[8e] Variance

[8e] [MacroEnd]

<version number>

The version number of the PerfectScript macro system has been changed to 9.0.0, to allow compile time and runtime version specific checks. This affects the IfPlatform, ElseIfPlatform, EndIfPlatform, MacroInfo and VersionInfo commands. This will also cause a macro compiled under this PerfectScript macro system to recompile on an older version macro system.



[8e] /* and */

'C' language block comment statements of /* to start, and */ to end were introduced in WordPerfect Suite 8. In WP8 (and PO8), block comments were ignored while in an ifplatform statement block that was ignoring code (but active in an ifplatform statement block that was compiling code). This prevented block comments from being used to comment out the endifplatform statement, unlike the '//' single line comments that were active and could be used. This has been changed, and block comments are now active within the body of an ifplatform block that is ignoring code.



This change clarifies the precedent level for the comment statements. Comment statements of a higher precedent level are active within comment statements of a lower precedent level, which allows comment statements of a higher level to be used to "comment out" the comment end statement of a lower level. For example, a /* */ block comment or a // single line comment may be used within an ifplatform statement block to cause an endifplatform statement not to be recognized by the compiler, and a // single line comment may be used within the body of a /* */ block comment to cause a */ block comment end not to be recognized.



The comment precedent level is:

1 - // single line comments

2 - /* and */ block comments

3 - ifplatform and endifplatform blocks



[8e] ... := AppLocate (...)

When the window caption to locate is "*", this command now returns the handle of the current foreground window, not the current focus window.



Assert (Condition:enumeration)

A new enumeration has been defined for the Condition parameter.

Condition The condition to assert.

VarErrChkCondition! Assert a VarErrChk condition. This condition occurs when an undefined variable is accessed. This simulates access to an undefined variable.

[8e] Timer! Assert a Timer condition. Timer conditions normally occur when a timer has expired.



enumeration or numeric := BIFWrite (...)

A new return enumeration was added.

return-value If the write fails, then an error is returned.

DelItemNotFound! Attempt to delete an item failed because the item was not found.



array := BinaryPack (...)

array := FileTypeList (...)

array := SortArray (...)

array := StrParseList (...)

The return value for these commands can now be an empty array.

return-value Formerly, when there was no data to be returned, then a single element array with either a numeric value of 0, or a string value of "" was returned. This made it difficult to determine whether this was a valid return value or not. Now, when there is no data, then an empty array will be returned. This can be checked for by accessing the [0] array element to get the count of array elements, and then checking this value against 0 (which indicates that there are no elements, thus an empty array).



[8e] ... := Cancel ([State:enumeration])

[8e] ... := Condition (...; [State:enumeration])

[8e] ... := Error ([State:enumeration])

[8e] ... := ExitHandlerState ([State:enumeration])

[8e] ... := NotFound ([State:enumeration])

[8e] ... := PersistAll ([State:enumeration])

[8e] ... := VarrErrChk ([State:enumeration])

A new enumeration has been added to the State parameter.

[State] The new state to set the condition to.

Toggle! This toggles the current state. If the current state is Off!, then it will be set to On!. If currently On!, then it will be set to Off!.



numeric := Combinations (N:numeric; [M:numeric])

numeric := Permutations (N:numeric; [M:numeric])

The order of the parammeters N and M have been reversed. Since these command were not documented for 8e where they were added, this will not be a problem since no one has used them yet. Parameter M has also been made optional. If missing, it defaults to the same value as N.



... := Condition (Condition:enumeration; ...)

A new enumeration has been defined for the Condition parameter.

Condition The condition to enable or disable.

VarErrChkCondition! Enable or disable VarErrChk conditions.

[8e] Timer! Enable or disable Timer conditions.



[8e] ... := DateString (...; [Type:enumeration]; ...)

A new enumeration has been added to the Type parameter.

[Type] The type of date string to generate. If this parameter is missing, then Short! is used, unless the Format parameter is specified, and then the Format parameter string is used. This is the same as specifying Custom! for the Type parameter.

Custom! The format is specified as a string in the Format parameter.



numeric or enumeration := DDEExecute (...; [TimeOut:numeric or enumeration]; [Label:label])

The functionality of this command has been extended to include all the functionality of the DDEExecuteExt command (which has been made obsolete). This was done by adding TimeOut and Label parameters, and by extending this command to return a value.

return-value If unsuccessful (such as a memory allocation error), an enumeration value of Error! is returned. Otherwise the transaction id is returned (if Asynchronous! is specified for the TimeOut parameter), or the DDE_APPSTATUS bits are returned. This value is for informational purposes only, and cannot be used by any other command.

Error! The command was not successful.

[TimeOut] This specifies the maximum amount of time to wait for the poke operation to complete. This value is expressed in milliseconds (ie. 1000 = 1 second), and must be > 0. Rather than a numeric value, one of the following enumerations may be specified instead. If missing, Standard! is used.

Asynchronous! Don't wait for the command to complete. Return immediately, and call the label specified by the Label parameter when the command completes. If Asynchronous! is specified, then the Label parameter must also be specified.

Standard! Use 18000 ms (18 seconds).

NoTimeOut! This command uses the maximum timeout value possible (approximately 24.8 days).

DontWait! Don't wait for this command to finish. This is the same as specifying a timeout value of <= 0, or Asynchronous!.

[Label] The name of a label in the macro file to be called when the DDEExecute request completes, if Asynchronous! was specified as the TimeOut value. This parameter must be specified if Asynchronous! is specified as the TimeOut parameter.



... := DDEExecuteExt (...; [TimeOut:numeric or enumeration]; ...)

The TimeOut parameter has been changed to accept either a numeric value (as before), as well as accept some new enumeration values. The return value will now return an enumeration if an error occurred.

return-value If unsuccessful, an enumeration value of Error! is returned, which was formerly the value 0. Otherwise the transaction id is returned (if Asynchronous! is specified for the TimeOut parameter), or the DDE_APPSTATUS bits are returned. This value is for informational purposes only, and cannot be used in any other commands.

Error! The command was not successful.

[TimeOut] This specifies the maximum amount of time to wait for the poke operation to complete. This value is expressed in milliseconds (ie. 1000 = 1 second), and must be > 0. Rather than a numeric value, one of the following enumerations may be specified instead. If missing, Standard! is used.

Asynchronous! Don't wait for the command to complete. Return immediately, and call the label specified by the Label parameter when the command completes. If Asynchronous! is specified, then the Label parameter must be specified.

Standard! Use 18000 ms (18 seconds).

NoTimeOut! This command uses the maximum timeout value possible (approximately 24.8 days).

DontWait! Don't wait for this command to finish. This is the same as specifying a timeout of <= 0, or Asynchronous!.



numeric or enumeration := DDEInitiate (...)

The return value will now return an enumeration if not successful.

return-value The conversation handle of the connection is returned if successful. If not successful, then an enumeration value of Error! is return, which was formerly the value 0.

Error! The conversation was not established successfully.



[8e] DDEPoke (...; [TimeOut:numeric or enumeration])

A new TimeOut parameter has been added.

[TimeOut] This specifies the maximum amount of time to wait for the poke operation to complete. This value is expressed in milliseconds (ie. 1000 = 1 second), and must be > 0. Rather than a numeric value, one of the following enumerations may be specified instead. If missing, Standard! is used.

Standard! Use 18000 ms (18 seconds). This is the same value that was used by this command before a TimeOut parameter was added.

NoTimeOut! This command uses the maximum timeout value possible (approximately 24.8 days).



[8e] ... := DDERequest (...; [TimeOut:numeric or enumeration])

New timeout parameter - also changed in 8 (rev B or C?).

[TimeOut] This specifies the maximum amount of time to wait for the poke operation to complete. This value is expressed in milliseconds (ie. 1000 = 1 second), and must be > 0. Rather than a numeric value, one of the following enumerations may be specified instead. If missing, Standard! is used.

Standard! Use 18000 ms (18 seconds). This is the same value that was used by this command before a TimeOut parameter was added.

NoTimeOut! This command uses the maximum timeout value possible (approximately 24.8 days).



DDETerminate ([ConversationID:numeric])

The ConversationID parameter is now optional.

[ConversationID] The DDE conversation to terminate. If missing, then all conversations are terminated, and this command behaves like the DDETerminateAll command.



[8e] ... := DefaultUnits ([Units:enumeration])

A new enumeration has been added to the Units parameter.

[Units] The units to specify as the new default units type. A new enumeration has been added. If this parameter is missing, then NoChange! is used.

NoChange! Return the current default units, but don't change the new default units type.



... := DialogAddBitmap (...; FileName:string; [Name:string]; [Style:enumeration]; ...; [TransparentColor:numeric or enumeration])

Some explanation on how the Filename and Name parameters are used is needed.

[8e] New enumerations have been added to the Style parameter, and the TransparentColor parameter has been made an enumeration, with enumerations defined for common color choices.

Filename If "" or "0", and the Name parameter is missing, "" or "0", then no bitmap is loaded, and the bitmap control is cleared to nothing. If the Name parameter is missing, "" or "0", then the Filename parameter is the name of a bitmap file (*.bmp) that is to be loaded from the disk. Otherwise, the Filename parameter is the name of a DLL file that contains a bitmap resource to load. If the Filename parameter is "" or "0", then the PFIT90EN.DLL file is used. If the Filename parameter is a number (other than "0"), then it is the instance handle of an already loaded DLL. If the specified bitmap cannot be found, then a special bitmap is displayed instead to indicate that there was an error.

[Name] If specified, the Name parameter identifies a bitmap resource in a DLL file to be loaded. If the Name parameter begins with "#", then the remainder is assumed to be an integer number which is the resource id of the bitmap to load. Otherwise, the Name parameter is the resource name of a bitmap to load. If the specified bitmap cannot be found, then a special bitmap is displayed instead to indicate that there was an error.

[8e] [Style] Specifies the style of the bitmap control. New enumerations has been added that cause the same behavior that was specified by leaving this parameter off in previous versions. If this parameter is missing, then NoResize! | Opaque! is used.

NoResize! Don't resize the bitmap to fit the control, and don't resize the control to fit the bitmap.

Opaque! The background is drawn with an opaque background (rather than transparent).

[8e] [TransparentColor] If the Style parameter is Transparent!, then this parameter defines what color is to be used as the transparent color. This parameter may be specified as a numeric value of the color specified as an RGB value, with the red component value of 0 to 255 in bits 0-7, the green component value of 0 to 255 in bits 8-15, and the blue component value of 0 to 255 in bits 16-23, (and 0 in bits 24-31) or a predefined enumeration may be specified that defines the RGB value of some predefined colors.

White! An RGB color value of 00FFFFFFx.

Black! An RGB color value of 00000000x.

Red! An RGB color value of 000000FFx.

Green! An RGB color value of 0000FF00x.

Blue! An RGB color value of 00FF0000x.

Cyan! An RGB color value of 00FFFF00x.

Yellow! An RGB color value of 00FFFF00x.

Magenta! An RGB color value of 00FF00FFx.

Orange! An RGB color value of 000080FFx.

Purple! An RGB color value of 00800080x.

Gray25! An RGB color value of 00C0C0C0x.

Gray50! An RGB color value of 00808080x.

Gray75! An RGB color value of 00404040x.



[8e] ... := DialogAddCheckBox (...; [Style:enumeration])

A new enumeration has been added to the Style parameter.

[Style] The style of the checkbox to add. If missing, then CheckboxAuto! | TextOnRight! is used.

TextOnRight! The descriptive text is placed to the right of the checkbox.



... := DialogAddComboBox (...; [Style:enumeration]; ...)

A new enumeration has been added to the Style parameter.

[Style] The style of the combobox to add. If missing, then Sorted! is used.

Sorted! The items are sorted. This is the same as the now obsolete enumeration Sort!.



... := DialogAddIcon (...; IconName:string; [Instance:numeric]; ...)

Some explanation on how the IconName and Insance parameters are used is needed.

IconName If "" or "0", then no icon is loaded, and the icon control is cleared to nothing. Otherwise, the IconName parameter identifies an icon resource in a DLL file to be loaded. If the IconName parameter begins with "#", then the remainder is assumed to be an integer number which is the resource id of the icon to load. Otherwise, the IconName parameter is the resource name of an icon to load. If the specified icon cannot be found, then a special icon is displayed instead to indicate that there was an error.

[Instance] The Instance parameter is the instance handle of a DLL that contains the icon resource to load. If the Instance parameter is missing, "" or "0", then the PFIT90EN.DLL file is used.



... := DialogAddScrollBar (...; [Step:numeric])

The run time behaviour of the scrollbar has been changed. For macro dialogs created with the DialogDefine statement, the Step parameter was being ignored, and set to 1. This value is now used.



DLLFree (ModuleInstance:numeric)

The ModuleInstance parameter was changed from a short numeric to a long numeric.



numeric := DLLLoad (...)

The return-value was changed from a short numeric to a long numeric.



ElseIfPlatform ([{<PlatformID>enumeration}])

EndIfPlatform ([{<PlatformID>enumeration}])

See IfPlatform below.



enumeration := ErrorNumber

New return enumerations have been defined.

return-value The type of error that has occurred.

VarErrChkAsserted! An undefined variable was accessed.

[8e] Timer! A timer has expired.



enumeration := FileConvert (...; SourceFIleType:enumeration]; ...; DestinationFileType:enumeration)

New return enumeration values have been defined. New enumerations have been defined for the SourceFileType and DestinationFileType commands.

[8e] return-value A value indicating the status of the command. If the return value is not equal to Success!, then an error occurred. Enumeration values have been defined for many of the common error values. The same enumerations are returned from the command as the enumerations returned from the FileConvertError () command. See the return value of that command for the return enumerations types for this command.

[SourceFileType] The file type of the source file. The following new enumerations have been added.

AdobePhotoshop!

CorelDRAW8!

CorelDRAWClipart!

CorelPHOTOPaint7!

KodakPhotoCD!

PCPaintBrush!

QuattroPro6!

QuattroPro7!

QuattroPro78!

QuattroPro8!

RichTextFormat!

SDIF!

UnicodeText!

WordPerfect6789! This is the same as the now obsolete enumeration WordPerfect678!.

WordPerfect6x!

WordPerfect7!

WordPerfect8!

WordPerfectCompound!

WP6xText! The file contains WordPerfect word character text data only. This is not a WordPerfect document, but just the text data from a WordPerfect document in word characters.

[DestinationFileType The file type of the destination file. The following new enumerations have been added:

CorelPHOTOPaint7!

Lotus123v4!

PCPaintBrush!

PresentationsShow!

RichTextFormat!

SDIF!

UnicodeText!

WordPerfect6789! This is the same as the now obsolete enumeration WordPerfect678!.

WordPerfect9!

WordPerfectCompound!

WP6xText! The file contains WordPerfect word character text data only. This is not a WordPerfect document, but just the text data from a WordPerfect document in word characters.



[8e] enumeration := FileConvertError (...)

New return enumeration values have been defined.

return-value A value indicating the status of the command. If the return value is not equal to Success!, then an error occurred. Enumeration values have been defined for many of the common error values.

Success! Success

InAndOutSame! Output file same as input

NoDriver! No driver to call

UnknownGraphic! Unknown graphics format

Incompatible! Requested formats are incompatible

UnknownType! Unknown file format

UnknownTypeSpecified! Unknown file format entered

UnknownTypeDetected! Unknown file format detected

InvalidSource! Invalid input file name

InvalidSourceSpec! Invalid drive/path on input filespec

InvalidSourceName! Invalid drive/path on input filename

InvalidDestination! Invalid output file name

InvalidDestinationSpec! Invalid drive/path on output filespec

InvalidDestinationName! Invalid drive/path on output filename

UnsupportedFormat! Unsupported file format detected

DetectDriverMissing! Detection driver unavailable

ThirdPartyError! Unknown error in Third Party Conversion

OutOfMemory! Out of memory

OutOfFileMemory Out of memory

IncorrectSourceFormat! Input file is not format specified

FileLocked! The file is locked

DiskFull! Out of disk space

NoFileDescriptors! No available file descriptors

NoGraphicConverter! No graphics converter to call

DocumentCorrupt! Document appears to be corrupted

IgnoringDetectedType! Detected file format is set to be ignored

FileNotSpreadsheet! File is not a spreadsheet

EntriesNotConverted! Several entities were not convertible

NoConvertibleData! No convertible data was received

InvalidSourceData! Invalid data found in input file

InvalidFormatStruct! Invalid format structure

InvalidBodyText! Invalid body text structure

InvalidFieldDelim! Invalid field delimiter input

InvalidRecordDelim! Invalid record delimiter input

InvalidStripChar! Invalid strip character input

InvalidMemoryPointer! Invalid memory pointer

InvalidDriverHdr! Invalid Driver Header

InvalidBatchCmd! Invalid Batch Command Entered

InvalidEncapsulation! Invalid Encapsulation Character entered

InvalidCodePage! Invalid code page specified

EndOfFile! End of file

NoSourceNames! No filenames available for input file

DriverInitFailed! Driver initialization failure

VerifySourceType! Verify Input file type as

ConfirmCancel! Confirm CANCEL



enumeration := FileError ()

The return value for this command is now an enumeration.

return-value The type of error that occurred. The return value was formerly a numeric, with an I/O subsystem error code in the loword, and a Windows error code in the hiword. Enumerations have now been defined for the most common error codes that may occur in the loword.

The entire return value (not just the loword) may be compared to these enumerations:

Success! There was no error. The last file operation was successful.

UnknownError! An unknown error occurred.

Error! (same as above)

The following enumerations may be returned in the loword of the return value:

OutOfMemory!

AllocationError!

BadFileFormat!

FileLocked!

CantLockFile!

AccessDenied!

NoFileHandles!

FileExists!

InvalidDivePath!

FileNotFound!

DiskFull!

FileReadError!

InvalidFileHandle!

CantOpenFile!

MemoryWrite!

MemoryRead!

CantCreateProcess!

IllegalCharacters!

NotWPCFile!

InvalidToken!

InvalidParameter!

BadPRSFile!

NoPrinter!

PrinterInit!

PrintProcessError!

PrefixReadError!

PrefixWriteError!

PrefixCreateError!

InvalidMapping!

FPError!

FPEInvNum!

FPEOverflow!

FPEUnderflow!

FPEDivZero!

FPEPrecision!

Cancel!

GraphicViewport!



... = FileNameDialog ([StyleOptions:enumeration]; ...; [Parent:string])

A new enumeration for the StyleOptions parameter has been added. A new optional parameter is available for setting the parent of the dialog.

[StyleOptions] Options and styles for the dialog.

EnhancedDialog! Display the Corel PerfectFit enhanced dialog. This is the same as the now obsolete enumeration PerfectFitDialog!.

[Parent] This parameter is the region name or window handle of the window that should be the parent of the file name dialog. If missing, then the default parent is determined by the macro system based on the application that started the macro, and whether a new default parent has been specified by the SetDefaultParent command (see the SetDefaultParent command).



... := FileNameDialog (...)

GetNumber (...)

GetString (...)

GetUnits (...)

... := MessageBox (...)

... := Menu (...)

... := MenuList (...)

Prompt (...)

<user define macro dialogs>

<other dialogs and message boxes>

In previous releases, using these commands would occasionally cause anomalies in the display. For example, a Prompt or a Get command could sometimes result in the dialog displaying behind the application rather than in front of it. In version 9, these commands display their dialogs in front of the default parent. The parent for these dialogs is now maintained by the macro, and is initially set to the application that started the macro. These dialog may be attached to a different application or window by setting a new default parent with the SetDefaultParent command.



numeric or enumeration := FilePosition (...)

numeric or enumeration := FileRead (...)

numeric or enumeration := FileSize (...)

numeric or enumeration := FileWrite (...)

numeric or enumeration := FileTruncate (...)

numeric or enumeration := GetFileDateAndTime (...)

numeric or enumeration := OpenFile (...)

The return value can now also be a enumeration value.

return-value If an error occurred, then a numeric value of -1 was formerly returned. A new enumeration value of Error! has been defined for this same numeric value.

Error! An error occurred while performing this command. Use the FileError command to obtain more information about the error that occurred.



enumeration := FileType (...)

New return enumerations have been defined for some error conditions, and for some new file types.

return-value The type of the file if recognized. If there was an error in determining the file type, then several special enumerations are returned as an indication of this.

Success! This value is never returned, but may be used as a check to determine if an error occurred. All error enumerations are less than this value.

For example:

a := FileType (...)

If (a < FileType.Success!)

// An error occurred.

EndIf

OpenReadError! An error occurred opening or reading the file.

OutOfMemory! An out of memory condition occurred.

PasswordProtected! The specified file is password protected.



AdobePhotoshop!

CorelDRAW8!

CorelPHOTOPaint7!

KodakPhotoCD!

Paradox!

PCPaintBrush!

PresentationsMaster!

PresentationsMaster3!

PresentationsShow!

PresentationsShow3! This is the same as the now obsolete enumeration Show!.

QuattroPro6!

QuattroPro78!

RichTextFormat!

UnicodeText!

WordPerfectCompound!

XML!

Zip!



enumeration := FileTypeExtension (FileType:enumeration)

New enumeration values have been defined for the FileType parameter.

return-value The file name extension for the specified file type. If the specified file type is not recognized, then an empty string "" is returned. Some file types do not have an associated file type name extension, and will also return a "".

FileType The type of the file to return the file name extension for. The enumerations allowed for this parameter are the same as the enumerations allowed for the FileType parameter of the FileTypeName command. See that command for the list.



enumeration := FileTypeName (FileType:enumeration)

New enumeration values have been defined for the FileType parameter.

return-value The file type name for the specified file type. If the specified file type is not recognized, then an empty string "" is returned.

FileType The type of the file to return the file type name for.

AdobePhotoshop!

AnsiCRLFtoSRt!

AnsiDelimited!

AnsiGenericWP!

AsciiCRLFtoSRt!

AsciiDelimited!

AsciiGenericWP!

CorelDRAW8!

CorelDRAWClipart!

CorelPHOTOPaint7!

KodakPhotoCD!

Paradox!

PCPaintBrush!

PresentationsMaster!

PresentationsMaster3!

PresentationsShow!

PresentationsShow3! This is the same as the now obsolete enumeration Show!.

QuattroPro6!

QuattroPro7!

QuattroPro78!

QuattroPro8!

RichTextFormat!

UnicodeText!

WordPerfect6789! This is the same as the now obsolete enumeration WordPerfect678!

WordPerfect6x!

WordPerfect7!

WordPerfect8!

WordPerfectCompound!

WP6xText! The file contains WordPerfect word character text data only. This is not a WordPerfect document, but just the text data from a WordPerfect document in word characters.

XML!

Zip!



For

ForNext

The ability to use keywords rather than ";" wasn't working in all cases for For and ForNext. Fixed.



... := FileWrite (...; [NewLine]; ...)

New enumerations have been added to the NewLine parameter.

[NewLine] Options controling additional actions performed by this command.

NoNewLine! Do not ed this write with the end of line markers.

FlushData! Force the data to be flushed to the disk after this operation.

BufferData! Allow the operating system to buffer the data.



date/time or enumeration := GetFileDateTime (...; [DateType:enumeration])

A new parameter has been added to specify which file date and time to return. An enumeration can now be returned.

return-value The date and time of the type specified for the file. Or the enumeration Error! if an error occurred.

Error! An error occurred.

[DateType] The type of date and time to return. If missing, ModificationDateTime! is used.

CreationDateTime! Return the date and time the file was created.

LastAccessDateTime! Return the date and time the file was last accessed.

ModificationDateTime! Return the date and time the file was last modified.



[8e] GetNumber (VariableName:variable; [Prompt:string]; [Title:string])

[8e] GetString (VariableName:variable; [Prompt:string]; [Title:string]; ...)

[8e] GetUnits (VariableName:variable; [Prompt:string]; [Title:string])

The Prompt and Title parameters are now optional. These parameters were supposed to be optional before, but would cause a runtime error if left off. The contents of the variable specified by the VariableName parameter is now read as well as written to.

VariableName The name of the variable to receive the new value being prompted for. If this variable already exists, then its current value will be placed into the edit field of the prompt as the initial value.

[Prompt] The prompt text for the prompt. If missing, "" is used.

[Title] The title for the caption bar of the prompt. If missing then "Corel PerfectScript" is used.



IfPlatform ([{<PlatformID>enumeration}])

A new enumeration has been added to the PlatformID parameter. This is a compile time only statement, and cannot be used at runtime to determine the platform id or version that the macro is running on. Use the MacroInfo command, or the VersionInfo command to determine platform type and version numbers at runtime.

[{PlatformID}] This parameter specifies a list of ids. If any of the ids in this list matches the id that this version of the macro system recognizes, then the statements in the body of the IfPlatform block will be compiled. Otherwise the body is ignored as if it contained comments. If the id is a numerical or string value, then this value is compared to the version number of the current macro system, and if equal, then the body of statements are compiled. If this parameter is missing, then the statement body is ignored as if no recognized id was specified. This is the same as specifying Ignore!.

Win98! This enumeration is recognized if the macro is compiled on a Windows 98 system.

_Version9! This enumeration is recognized if the macro is compiled using any version 9 PerfectScript macro system.

_Version9_0_0! This enumeration is recognized if the macro is compiled using the version 9.0.0 PerfectScript macro system.

Ignore! All statements in the body of the block are ignored. This is the same as specifying a platform id that doesn't exist.

9.0 Any numeric value is compared against the macro system version number.

"9.0", "9.0.0" Any string value is compared against the macro system version number.

_Version_! When this enumeration is used, then a relational comparision expression is expected to follow this. The format is:

_Version_! <operator> <value>string or numeric

The accepted <operator>s are:

=, !=, <>, <, <=, >, >=

The <value> is a numeric or string value representing the version number to check for.

The current macro system version number is compared to the provided <value> using the specified <operator>, and if the comparison is True, then the PlatformID is considered to match the current platform id. If the provided <value> contains only a major version number, then only the major version number is compared. If it contains only a major and minor version number, then only the minor and major version numbers are compared. For example, if <Value> is "9", then it will match all versions of 9. If "9.0" is specified, then only version 9.0 (WP9) will match.



[8e] numeric or enumeration := MacroCompile (...; [Options:enumeration])

A new enumeration has been added to the Options parameter.

[Options] Options affecting how the macro is compiled. If missing, Wait! is used.

ShowIcon! Show an icon in the Windows system tray area while this macro is being compiled. This option only has an effect if the PerfectScript setting "Show Tray Icons" is turned off, since a tray icon is normally always displayed. If it is turned off, then tray icons are not displayed, and then this option causes the icon to be displayed.



any (enumeration, boolean, string, numeric, label, array) := MacroInfo (InfoItem:enumeration; ...)

The return value from this command can now be an enumeration. Some InfoItem values which used to return numeric values, now return enumeration values that are defined to have the same numeric values as the numeric values from before. The return value for this commands can now be an empty array. New enumerations now exist for the InfoItem parameter.

return-value Some InfoItem values now return an enumeration. The return value for the MacroArgs! and ChainFileArgs! InfoItems can now be an empty array. See the description of these InfoItem values below for a description of the return enumerations and values.

InfoItem The item to return information about.

PlatformName! Windows 98 is now detected, and a string identifying this is returned.

Unicode! Return whether this system uses unicode strings.

The following InfoItem's now return enumeration values:

ErrorNumber! (Enumeration) This item returns the same value as the ErrorNumber command. The possible values are:

Success! Formerly value 0. There was no error.

CancelConditionAsserted! Formerly value 1. A Cancel condition was asserted.

ErrorConditionAsserted! Formerly value 2. An Error condition was asserted.

NotFoundConditionAsserted! Formerly value 7. A Not Found condition was asserted.

UserDefinedCondition! Formerly value 100. This value defines the base value for assertions of user defined conditions. See the Assert command for more information about the value of user defined condition codes.

VarErrChkAsserted! A VarErrChk condition was asserted. This occurs when an unhandled access to an undefined variable occurs.

[8e] Timer! A Timer has expired.

The following error values are used internally, but are not currently available from this command. These are for documentation only:

GeneralFailure!

InternalError!

InterpreterBusy!

IOError!

RuntimeError!

UserAbort!

UserCancel!

UserError!

UserNotFound!

DefaultUnits! (Enumeration) This item returns the same value as the DefaultUnits command (current default units type in effect). The possible values are:

None! Formerly value 0.

Centimeters! Formerly value 1.

Inches! Formerly value 2.

Millimeters! Formerly value 3.

Points! Formerly value 4.

WPUnits! Formerly value 5.

The following items may return an empty array. Formerly, when there was no data to be returned, then a single element array with either a numeric value of 0, or a string value of "" was returned. This made it difficult to determine whether this was a valid return value or not. Now, when there is no data, then an empty array will be returned. This can be checked for by accessing the [0] array element to get the count of array elements, and then checking this value against 0 (which indicates that there are no elements, thus an empty array).

MacroArgs! The array of arguments passed to the macro on startup.

ChainFileArgs! The array of arguments to be passed to the Chain macro (if setup).

The following are new InfoItem enumeration items:

TokenError! (Enumeration) This new item returns the token handler return status value from the last token handler to be called (both internal and external tokens). The possible values are:

TokenOK! Formerly value 0. There was no error.

UnknownToken! Formerly value -99. There is no such token.

NotFoundCondition! Formerly value -98. A NotFound condition occurred.

CancelCondition! Formerly value -97. A Cancel condition occurred.

ErrorCondition! Formerly value -96. An Error condition occurred.

InvalidParameter! Formerly value -95. A parameter was invalid.

TokenInvalid! Formerly value -94. Token invalid at this time.

NotHandled! Formerly value -93. Token wasn't handled.

ReturnLater! Formerly value -92. Token will return later - this value is no longer used.

[8e] DLLCallBufferSize! (Numeric) This new item returns the minimum size of the buffer used when passing string variables by address to DLLCalls. The actual size is the larger of this size, and the current size of the string currently in the variable being passed by address.

VarErrChkOn! (Boolean) This new item will return whether VarErrChk is currently enabled.

VarErrChkSetup! (Boolean) This new item will return True if a label has been established for undefined variable access errors by the OnVarErrChk and OnVarErrChk Call commands.

VarErrChkCall! (Boolean) This new enumeration will return True if a label has been established for undefined variable access errors by the OnVarErrChk Call command, and False if a label has been established for undefined variable access errors by the OnVarErrChk command.

VarErrChkHandler! (Label) This new item will return the label to be called or jumped to if an undefined variable is accessed.

[8e] TimerOn! (Boolean) Returns whether the timer is currently enabled.

[8e] TimerSetup! (Boolean) Returns True if a label has been established for the timer.

[8e] TimerCall! (Boolean) Returns True if setup with an OnTimer Call command, False for an OnTimer command.

[8e] TimerHandler! (Label) Returns the label to be called or jumped to.

[8e] TimerTimer! (Numeric) The timer id value.

[8e] TimerOneTime! (Boolean) Returns True if this is a one shot timer, False if the timer is repeating.

[ItemData] Additional data used by the item specified in ItemInfo.

AllUserDefinedConditions! The command affects all user defined constions.

[8e] Timer! Number of the timer the Timer...! ItemInfo items apply to.

[8e] AllTimers! Timer...! ItemInfo items apply to all timers.

[8e] Toggle! Toggle the current state of the item from on to off, or off to on.

NoChange! Don't change the current state of the item, just return its current state.



[8e] ... := MacroPlay (...; [Options:enumeration]; ...)

A new enumeration has been added to the Options parameter. Dialogs and their behavior while running with the NoPrompts! option is described.

[Options] Options affecting how the macro is played.

ShowIcon! Show an icon in the Windows system tray area while this macro is being played. This option only has an effect if the PerfectScript setting "Show Tray Icons" is turned off, since a tray icon is normally always displayed. If it is turned off, then tray icons are not displayed, and then this option causes the icon to be displayed.

ShowProgress! Display the play progress and play summary dialogs during play. If NoPrompts! is specified, then the summary dialog is automatically dismissed and does not require user dismissal.

NoPrompts! Don't display or wait for any prompts or dialogs from the macro interpreter or the macro as it plays. Prompts and dialogs are automatically dismissed with the default option for that prompt or dialog. Some prompts or dialogs are displayed before being automatically dismissed; some are displayed and then automatically dismissed; others are not displayed. This currently does not function for ALL prompts or dialogs. It does not work for the input validity prompts in the macro debugger and in the GetNumber and GetUnits commands. User macro dialogs still need to be dismissed. The Coach... commands that display prompts are not automatically dismissed. The following prompts or dialogs are automatically dismissed with the following behavior:

-FileNameDialog - The initial path and initial file is returned.

-DirectoryCreate, DirectoryDelete, DirectoryRename, SetFileAttributes, FileCopy, FileDelete, FileRename - The Prompts parameter is set to NoPrompt!.

-MessageBox - The default button is pressed.

-GetNumber, GetUnits, GetString - The OK button is pressed and the initial values are returned.

-NetConnectionDlg - The network connection dialog is not displayed, and a DialogCanceled! value is returned as if the Cancel button were pressed.

-NetDisconnectDlg - The network disconnect dialog is not displayed, and a Success! value is returned as if the OK button were pressed.

-Play progress dialog - This modeless dialog is displayed as usual.

-Play summary dialog - The OK button is pressed.



numeric := Menu ([MnemonicType:enumeration]; ...)

This command is now a function that returns the selected menu item. This is the same value that was returned in the former first parameter called MenuPick. A new enmeration exists for the MnemonicType parameter.

return-value The index number of the item that was selected is returned, starting at 1. If there was an error, or the menu was canceled (by pressing the escape key), then the value 0 is returned.

[MnemonicType] This parameter is now optional. If it is missing, then Either! is used. This indicates the type of mnemonic character that each menu item is preceded by.

Digit! The menu items are given mnemonics that are digits, starting at 1.

Letter! The menu items are given mnemonics that are letters, starting at 'a';

Either! If there are more that 9 menu items, then the items are given mnemonics of digits, otherwise they are given mnemonics of letters.



numeric := MenuList (...)

This command is now a function that returns the selected menu item. This is the same value that was returned in the former first parameter called MenuPick.

return-value The index number of the item that was selected is returned, starting at 1. If there was an error, or the menu was canceled (by pressing the escape key), then the value 0 is returned.



[8e] enumeration or numeric := NetAddConnection (...; [Type:enumeration]; ...)

The return value is now an enumeration or a numeric. A new Type enumeration has been added.

return-value The return value has been made an enumeration, and enumerations have been defined for many of the common return values. Other return values are returned as a numeric value. The defined return values are:

Success! Success.

DialogCanceled! The attempt to make the connection was canceled by the user through a dialog box.

AccessDenied! Access to the network resource was denied.

AlreadyAssigned! The local device is already connected to a network resource.

AlreadyRemembered! An entry for the device is already in the user profile.

CantOpenUserProfile! The system is unable to open the user profile to process persistent connections.

DeviceInUse! The device is in use by an active process and cannot be disconnected.

DeviceMismatch! The type of local device and the type of network resource do not match.

FilesStillOpen! There are open files, and the Force parameter is FALSE.

InsufficientMemory! There is insufficient memory to start the dialog box.

InvalidDevice! The device specified is invalid.

InvalidNetOrPath! A network component has not started, or the specified name could not be handled.

InvalidParameter! There is a bad combination of parameters.

InvalidPassword! The specified password is invalid.

InvalidProvider! The provider specified does not match any provider.

InvalidResource! The remote name specified is not acceptable to any network resource provider. The resource name is invalid, or the named resource cannot be located.

InvalidUserProfile! The user profile is in an incorrect format.

NetworkError! A network-specific error occurred.

NoConnection! There is no current connection to the remote device, but there is a remembered (persistent) connection to it.

NoNetwork! There is no network present.

NotConnected! The name specified is not a redirected device, or the system is not currently connected to the device.

NotSupported! The network provider does not support UNC names. This function is not supported by any of the network providers.

ProviderBusy! The router or provider is busy, possibly initializing. The caller should retry.

ResourceNotContainer! The resource does not specify a container.

UserCancel! The dialog was canceled by the user.

BufferTooSmall! The buffer is too small.

NoMoreItems There are no more entries. The buffer contents are undefined.

InvalidEnumHandle! The enum handle parameter is not valid.

[Type] The type of connection to add. If missing, Disk! is used.

Any! The network resource type is determined from the connection data.



[8e] enumeration or numeric := NetConnectionDlg ([Type:enumeration]; ...)

The return value is now an enumeration or a numeric. New Type enumerations have been added.

return-value The return value has been made an enumeration, and enumerations have been defined for many of the common return values. Other return values are returned as a numeric value. The defined return values are:

Success! Success.

DialogCanceled! The attempt to make the connection was canceled by the user through a dialog box.

AccessDenied! Access to the network resource was denied.

AlreadyAssigned! The local device is already connected to a network resource.

AlreadyRemembered! An entry for the device is already in the user profile.

CantOpenUserProfile! The system is unable to open the user profile to process persistent connections.

DeviceInUse! The device is in use by an active process and cannot be disconnected.

DeviceMismatch! The type of local device and the type of network resource do not match.

FilesStillOpen! There are open files, and the Force parameter is FALSE.

InsufficientMemory! There is insufficient memory to start the dialog box.

InvalidDevice! The device specified is invalid.

InvalidNetOrPath! A network component has not started, or the specified name could not be handled.

InvalidParameter! There is a bad combination of parameters.

InvalidPassword! The specified password is invalid.

InvalidProvider! The provider specified does not match any provider.

InvalidResource! The remote name specified is not acceptable to any network resource provider. The resource name is invalid, or the named resource cannot be located.

InvalidUserProfile! The user profile is in an incorrect format.

NetworkError! A network-specific error occurred.

NoConnection! There is no current connection to the remote device, but there is a remembered (persistent) connection to it.

NoNetwork! There is no network present.

NotConnected! The name specified is not a redirected device, or the system is not currently connected to the device.

NotSupported! The network provider does not support UNC names. This function is not supported by any of the network providers.

ProviderBusy! The router or provider is busy, possibly initializing. The caller should retry.

ResourceNotContainer! The resource does not specify a container.

UserCancel! The dialog was canceled by the user.

BufferTooSmall! The buffer is too small.

NoMoreItems There are no more entries. The buffer contents are undefined.

InvalidEnumHandle! The enum handle parameter is not valid.

[Type] The type of connection dialog to raise. If Missing, Disk! is used.

Printer! Raise a printer connection dialog.

Any! (not implemented)



[8e] enumeration or numeric := NetDisconnectDlg ([Type:enumeration]; ...)

The return value is now an enumeration or a numeric. A new Type enumeration has been added.

return-value The return value has been made an enumeration, and enumerations have been defined for many of the common return values. Other return values are returned as a numeric value. The defined return values are:

Success! Success.

DialogCanceled! The attempt to make the connection was canceled by the user through a dialog box.

AccessDenied! Access to the network resource was denied.

AlreadyAssigned! The local device is already connected to a network resource.

AlreadyRemembered! An entry for the device is already in the user profile.

CantOpenUserProfile! The system is unable to open the user profile to process persistent connections.

DeviceInUse! The device is in use by an active process and cannot be disconnected.

DeviceMismatch! The type of local device and the type of network resource do not match.

FilesStillOpen! There are open files, and the Force parameter is FALSE.

InsufficientMemory! There is insufficient memory to start the dialog box.

InvalidDevice! The device specified is invalid.

InvalidNetOrPath! A network component has not started, or the specified name could not be handled.

InvalidParameter! There is a bad combination of parameters.

InvalidPassword! The specified password is invalid.

InvalidProvider! The provider specified does not match any provider.

InvalidResource! The remote name specified is not acceptable to any network resource provider. The resource name is invalid, or the named resource cannot be located.

InvalidUserProfile! The user profile is in an incorrect format.

NetworkError! A network-specific error occurred.

NoConnection! There is no current connection to the remote device, but there is a remembered (persistent) connection to it.

NoNetwork! There is no network present.

NotConnected! The name specified is not a redirected device, or the system is not currently connected to the device.

NotSupported! The network provider does not support UNC names. This function is not supported by any of the network providers.

ProviderBusy! The router or provider is busy, possibly initializing. The caller should retry.

ResourceNotContainer! The resource does not specify a container.

UserCancel! The dialog was canceled by the user.

BufferTooSmall! The buffer is too small.

NoMoreItems There are no more entries. The buffer contents are undefined.

InvalidEnumHandle! The enum handle parameter is not valid.

[Type] The type of connection dialog to display. If missing, Disk! is used.

Any! A generic dialog with all network resource types is displayed.



[8e] ... := NToC (CharacterOrCharSet:numeric or enumeration; ...)

Enumerations have been defined for the CharacterOrCharSet parameter.

CharacterOrCharSet This parameter defines the character or the character set to be used. A full 16 bit numeric value can be specified, or one of the new enumerations can be used which specify certain control functions. As well as specifying 0f90ax for a hard return, the new HardReturn! enumeration may be specified.

HardReturn! Insert a Hard Return character.

Hrt! Synonym for HardReturn!.

Space! Insert a Space character.

HardSpace! Insert a Hard Space character.

Tab! Insert a Tab character.

HardPage! Insert a hard page break.

Hpg! Synonym for HardPage!

ExtraLargeOn! / ...Off! Turn Extra Large text on or off.

VeryLargeOn! / ...Off! Turn Very Large text on or off.

LargeOn! / ...Off! Turn Large text on or off.

SmallOn! / ...Off! Turn Small text on or off.

FineOn! / ...Off! Turn Fine text on or off.

SuperScriptOn! / ...Off! Turn Super Script text on or off.

SubScriptOn! / ...Off! Turn Sub Script text on or off.

OutlineOn! / ...Off! Turn Outline text on or off.

ShadowOn! / ...Off! Turn Shadow text on or off.

BoldOn! / ...Off! Turn Bold text on or off.

ItalicsOn! / ...Off! Turn Italic text on or off.

UnderlineOn! / ...Off! Turn Underline text on or off.

DoubleUnderlineOn! / ...Off! Turn Double Underline text on or off.

RedlineOn! / ...Off! Turn Redline text on or off.

StrikeOutOn! / ...Off! Turn Strike Out text on or off.

SmallCapsOn! / ...Off! Turn Small Caps text on or off.



... := OnCondition (Condition:enumeration; ...)

... := OnCondition Call (Condition:enumeration; ...)

A new enumeration has been defined for the Condition parameter.

Condition The condition type to specify a handler label for.

VarErrChkCondition! Specify a label to jump to (or call) if an undefined variable is accessed.

[8e] Timer! Specify a label to jump to (or call) when a timer expires.



[8e] ... := PersistAll ([State:enumeration])

For Version 7, this command was changed to accept an optional parameter to specify if the Persistent variable state should be turned on or off. The documentation was incorrectly written to state that if this parameter was missing then the state would not be changed. This is incorrect. If the State parameter is missing, then On! is used. This is compatible with the behavior of this command when it was originally added to the macro language. Since the new state will be set to On! if the State parameter is missing, then a new enumeration has been added to this parameter to allow the current state to be obtained without changing it.

[State] The new state. If missing, then NoChange! is used.

NoChange! The current state is obtained and not changed.



[8e] ... := RegionGetHandle (...; [Index:numeric or enumeration])

A new Index parameter has been added.

[Index] Specifies which handle is to be retrieved. If missing, Self! is used. If a numeric value > 0 is specified, then the handle of that child number window is returned. The valid values are 1 to the return value of the RegionGetChildCount command.

Parent! Return the handle of the parent of this region.

Self! Return the handle of this region. This is the what this command returned before the Index parameter was added to this command.

Child! This is a base value that may be added to a numeric 1 based index to return the handle of the specified child. The valid values are 1 to the return value of the RegionGetChildCount command.



[8e] ... := RegionGetPosition (...; [Units:enumeration])

[8e] ... := RegionMoveWindow (...; Units:enumeration)

A clarification on the use of the Units parameter is in order.

[Units] The Units parameter allows the use of either dialog units (DialogUnits!) or screen units (ScreenUnits!) in these commands. DialogUnits! specifies that the position and size values are in dialog units, which are relative to the size of the font being used in the dialog. ScreenUnits! specifies that the values are in screen units (pixels). If DialogUnits! is specified as the value of the Units parameter, then the specified region must be a dialog, otherwise an error is asserted by these commands, since there is no dialog information for the region to get the font size for. If ScreenUnits! is specified, then the region specified may be a dialog or a non-dialog type of window.

Percent! The units are in percentages of the screen size.



[8e] enumeration or numeric := RegistryCloseKey (Hkey:numeric or enumeration)

The Hkey parameter will now accept enumerations. The return value is now an enumeration.

return-value The status of the call. If successful, Success! is returned. Otherwise, an error has occurred. Enumerations have been defined for most of the common errors. See the RegistryQueryLast error command for a list of the error enumerations.

Hkey The registry key to close. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.



[8e] enumeration or numeric := RegistryCreateKey (...; [SubKey:string])

A new enumeration value has been defined that is returned if the specified key could not be created. This enumeration has the same value (0) that was returned before as a numeric to indicate the same condition. The SubKey parameter is now optional.

return-value A handle to the key that was created. If an error occurred, then Error! is returned.

Error! An error occurred creating the specified key. This value was formerly a numeric value of 0.

[SubKey] The sub key to create. If missing or "", then the specified key itself is created.



[8e] enumeration or numeric := RegistryDeleteKey (Hkey:numeric or enumeration; ...)

The Hkey parameter will now accept enumerations. The return value is now an enumeration.

return-value The status of the call. If successful, Success! is returned. Otherwise, an error has occurred. Enumerations have been defined for most of the common errors. See the RegistryQueryLast error command for a list of the error enumerations.

Hkey The registry key to delete a subkey of. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.



[8e] enumeration or numeric := RegistryDeleteValue (Hkey:numeric or enumeration; ...)

The Hkey parameter will now accept enumerations. The return value is now an enumeration.

return-value The status of the call. If successful, Success! is returned. Otherwise, an error has occurred. Enumerations have been defined for most of the common errors. See the RegistryQueryLast error command for a list of the error enumerations.

Hkey The registry key to delete a value of. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.



[8e] ... := RegistryEnumKey (Hkey:numeric or enumeration; ...)

The Hkey parameter will now accept enumerations.

Hkey The registry key to enumerate the subkeys for. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.



[8e] ... := RegistryEnumValue (Hkey:numeric or enumeration; ...)

The Hkey parameter will now accept enumerations.

Hkey The registry key to enumerate the values for. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.



[8e] enumeration or numeric := RegistryOpenKey (...; [SubKey:string])

A new enumeration value has been defined that is returned if the specified key could not be opened. This enumeration has the same value (0) that was returned before as a numeric to indicate the same condition (0). The SubKey parameter is now optional.

return-value A handle to the key that was opened. If an error occurred, then Error! is returned.

Error! An error occurred opening the specified key. This value was formerly a numeric value of 0.

[SubKey] The sub key to open. If missing or "", then the specified key itself is opened.



[8e] ... := RegistryQueryKeyCount (Hkey:numeric or enumeration)

The Hkey parameter will now accept enumerations.

return-value As a matter of clarification, 0 has always been returned if there was an error.

Hkey The registry key to get the count of subkeys for. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.



[8e] enumeration := RegistryQueryLastError ( )

This command now returns enumeration values for the most common errors.

return-value The error code associated with the last Registry command that was executed. If the last command was successful, then Success! is returned. Any other value is considered to be an error. Enumerations have been defined for the most common errors.

Success! no error

TokenError! registry token error

InvalidKey! registry key invalid

InvalidValue! invalid value for registry

NotFound! registry key or value not found

KeyMissing! could not find the key in the registry

BadIndex! on Reg..Enum... index was too large

KeyOpenError! configuration registry key could not be opened

KeyReadError! configuration registry key could not be read

KeyWriteError! configuration registry key could not be written

FileIOError! could not write registry files(s)

KeyDeleted! illegal operation on a deleted registry key

VolatileKey! cannot create a stable subkey under a volatile parent key

RegistryCorrupt! registry or one of its files is corrupt

UnknownError! unknown (uncataloged) error



[8e] RegistryQueryValue (Hkey:numeric or enumeration; ...)

The Hkey parameter will now accept enumerations. The Value parameter is now optional.

Hkey The registry key to get a value for. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.

[Value] The name of the value to get the value of. If missing or "", then the value of the default value of the key is retrieved.



[8e] RegistryQueryValueCount (Hkey:numeric or enumeration)

The Hkey parameter will now accept enumerations.

return-value As a matter of clarification, 0 has always been returned if there was an error.

Hkey The registry key to get the count of values for. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.



[8e] enumeration := RegistrySetValue (Hkey:numeric or enumeration; [Value:string]; ...)

The Hkey parameter will now accept enumerations. The return value is now an enumeration. The Value parameter is now optional

return-value The status of the call. If successful, Success! is returned. Otherwise, an error has occurred. Enumerations have been defined for most of the common errors. See the RegistryQueryLast error command for a list of the error enumerations.

Hkey The registry key to set a value for. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. It may also be an enumeration specifying one of the standard registry keys. See the RegistryOpenKey command for list of the predefined registry key enumeration values.

[Value] The name of the value to set the value of. If missing or "", then the default value of the key is set.



... := SetFileDateTime (...; [DateType])

A new parameter has been added to specify which file date and time to set.

[DateType] The type of date and time to set. If missing, ModificationDateTime! is used.

CreationDateTime! Set the date and time the file was created.

LastAccessDateTime! Set the date and time the file was last accessed.

ModificationDateTime! Set the date and time the file was last modified.



[8e] ... := StdDev ([Type:enumeration]; ...)

[8e] ... := Variance ([Type:enumeration]; ...)

A new Type parameter has been added.

[Type] The type of data that is specified.

Population! The data specifies the entire set of data.

Sample! The data represents only a sample of the data.



... := StrMakeList (...; [{SubString:string}])

The repeating parameter group containing the SubString parameter is now optional. This allows an empty array or array slice to be passed in, or this parameter may be left off.

{

[SubString] The list of sub strings. If missing, then an empty string is returned.

}



[8e] ... := ValueType (...; [Type:enumeration])

A new enumeration has been added to the Type parameter.

[Type] If a type is specified, then the return value is a boolean indicating whether the specified Value is of the specified type. If missing, then CurrentType! is used.

CurrentType! The actual type of the specified Value parameter is returned, rather than a boolean.



[8e] [MacroEnd] (<PlayLibraryStruct>:Raw Binary Data)

The PlayLibraryStruct parameter was formerly described as being optional. It is always present.





New Commands and Language features



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

<new reserved words>

<arrays>

<array indexes>

<array slices>

<JavaScript>

<syntactic language elements>

Amortize

Animate

CheckSum

Combinations

EndFunction

EndObject

End Object

EndProcedure

ExecuteToken

[8e] FileCheckSum

FileFlushData

FileWriteLine

INIRead

INIWrite

MaxN

[8e] MeanDev

Median

MinN

[8e] OnTimer

[8e] OnTimer Call

[8e] OnVarErrChk

[8e] OnVarErrChk Call

[8e] Permutations

PercentChange

PercentOf

PercentOfTotal

PrimeFactors

RandomStats

Redeclare

[8e] Reference

[8e] RegiongetChildCount

[8e] RegionGetId

[8e] RegionGetName

RegionGetOrder

[8e] RegionGetStyle

RegionGetType

RegionGetVariable

[8e] RunUnattended

SetDefaultParent

StdDev

TokenDialog

[8e] Timer

Variance

__IPF <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.



<arrays>

Non-arrays can be assigned to arrays, and arrays can be assigned to non-arrays. If an array is assigned to a non-array variable, then the assignment is really made to the array variable with the same name as the non-array variable, and the non-array variable is left untouched. If a non-array is assigned to an array variable, then the non-array value is converted into a single element array with that value, and assigned to the array variable.



<array indexes>

Negative array indexes can now be used. If negative, then the index is considered to be end relative, not start relative. An index of [-1] means the last element, [-2] is the second to last element, etc.



<array slices>

Several new features have been added for array slices.

Array slices can now be passed to repeating parameter groups of commands. Before, only entire arrays could be passed.

Empty slices can now be specified, if the end index is less than the first.

Negative array indexes can now be used in array slices. If negative, then the index is considered to be end relative, not start relative. An index of [-1] means the last element, [-2] is the second to last element, etc.



<JavaScript>

JavaScript is now supported. You can record to a JavaScript script and play back JavaScript scripts. For a description of the JavaScript objects and methods supported in PerfectScript, see the document titled JavaScript for Corel WordPerfect Suite.



<syntactic language elements>

Various syntactic elements of the macro language that are documented in various other places of the macro help and manual were added to the command browser for easier access by users. These elements are:

; Parameter separator - Used to separate parameters in calls to commands.

. Command prefix separator - Used to separate a command prefix from a command name.

.. Default application/object prefix - Used to indicate that the most current application or OLE object should be used for a command.

.. Array slice indicator - Used to separate array indexes when specifying an array slice value.

... Open ended array literal - Used to specify that a dimension of a multidimensional array literal may repeat the last value to make the size of all dimensions the same.

{} Array literal - Used to specify a literal array value.

{} Repeating parameters - Used to specify repeating parameters for a command.

() Parameter list - Used to specify the parameters in calls to commands.

() Expression - Used to identify a sub-expression.

' ' Character literal - Used to specify a literal character value.

" " String literal - Used to specify a literal string value.

# Variable name terminator - Used to specify that the preceding name is a variable. The use of a trailing # is optional, and only needs to be used if the name of the variable is the same as a PerfectScript language keyword..

@ Label terminator - Used to specify that the preceding name is a label. The use of a trailing @ is optional, and only needs to be used if the name of the label is the same as a PerfectScript language keyword.

! Enumeration terminator - Used to specify that the preceding name is an enumeration. All enumeration values must be followed by a !.

: Label definition terminator - Used instead of a Label command to define a label.

: Parameter name/value separator - Used to separate the name of a parameter from the value of a parameter when passing parameters by name to commands.

b Binary (base 2) numeric terminator - Used to specify that the preceding number is to be interpreted as a base n2number. Can only be used for integer numeric literal values.

o Octal (base 8) - Used to specify that the preceding number is to be interpreted as a base 8 number. Can only be used for integer numeric literal values.

h, x Hexadecimal (base 16) - Used to specify that the preceding number is to be interpreted as a base 16 number. Can only be used for integer numeric literal values.

w WPU units terminator - Used to specify that the preceding number is to be interpreted as a WPU measurement unit value. Can only be used for integer numeric literal values.

c Centimeters unit terminator - Used to specify that the preceding number is to be interpreted as a centimeters measurement unit value.

m Millimeters unit terminator - Used to specify that the preceding number is to be interpreted as a millimeters measurement unit value.

i, " Inches unit terminator - Used to specify that the preceding number is to be interpreted as an inches measurement unit value.

p Points unit terminator - Used to specify that the preceding number is to be interpreted as a points measurement unit value.



numeric := Amortize ([Principle:numeric]; [InterestRate:numeric]; [Duration:numeric]; [Payment:numeric)

The command accepts the 4 standard parts of a loan. If 3 of the 4 are specified, this command will compute and return the fourth one (which is left blank).

return-value The value of the missing item is returned. If more than one of the parameters is missing, then a value of 0.0 is returned.

[Principle] The amount of the load principle. This is the amount borrowed.

[InterestRate] The interest rate that will be charged. This is the interest rate per period. If the loan is payed once per month, then this is the monthly interest rate.

[Duration] The duration of the load in periods. If the loan is payed in months, then this is the number of months of the loan.

[Payment] This is the payment per period. If the loan is paid in months, then this is the monthly payment.



Animate (...)

This command is the same as the old "CoachAnimate" command which is now obsolete. It uses the same parameters as the CoachAnimate command.



numeric := CheckSum (Data:any; [Options:enumeration]; [Seed:numeric])

This command computes a checksum for a data value.

return-value The checksum is computed on the data value, and returned.

Data The data to compute the checksum on. Any type of data may be passed, including strings, numerics, rawbinary data, arrays, etc. If an array is passed, the cumulative checksum of the values of all the array elements is computed.

[Options] The checksum type to compute. Different types of checksums return checksums that are less prone to error than others. If missing, CheckSum32! is used.

CheckSum16! Compute a 16 bit checksum. This is the 16 bit checksum used internally by the PerfectFit shared code. The checksum in the loword of the return value.

CheckSum32! Compute a 32 bit checksum. This is the 32 bit checksum used internally by the PerfectFit shared code.

CRC_16! Compute a 16 bit checksum based on the CRC 16 polynomial. The checksum in the loword of the return value

CCITT! Compute a 32 bit checksum based on the CCITT polynomial.

AUTODIN_II! Compute a 32 bit checksum based on the AUTODIN II polynomial.

[Seed] A checksum from a previous piece of data that is used as a starting point for the checksum. This allows long streams of data to be computed, by passing the checksum from the previous piece of data into the Seed parameter of a subsequent piece. On the first piece of data, ommit this parameter, or specify as a 0. If missing, an initial seed is used that depends on the value of the Options parameter above.



[8e] numeric := Combinations (N:numeric; [M:numeric])

Return the number of combinations of N items taken M at a time.

return-value The number of possible combinations.

N The number of items.

[M] The number of items in the groups. If missing, then the value of N is used.



[8e] EndFunction ([<Label>label])

[8e] EndProcedure ([<Label>label])

These statements are synonyms for EndFunc and EndProc.

[<Label>] The label of the function or procedure this End... statement matches. This label is not verified to be the correct label, but is for documentation purposes only.



EndObject (<Prefix>variable)

End Object (<Prefix>variable)

This command is used to disallow this object prefix from being recognized by the compiler. It operates like the EndApp statement.

Prefix The name of the object prefix variable to disallow.



any := ExecuteToken (TokenID:tokenid; {[ParameterData:any]})

This command will execute the token specified by the TokenID parameter,