Corel Logo
Divider



Top

Navigational BarCorel

Ball

WordPerfect Suite 7 Changes

WordPerfect Trigger Tokens


New Corel Quattro Pro 7 Built-in Functions for Add-ins


WordPerfect and DDE

Server Name: WPWin7_Macros
Topic: Commands

Presentations and DDE

Server Name: Presentations
Topic: Command

Windows Open API (WOAPI)

WordPerfect now supports value returning commands

HandleToken( LPMAC_TOKEN, HWND, WORD ), exported at ordinal value 6, has been replaced with TPHHandleTokenValReturn( LPTPH_RETURNVAL, HWND, WORD ).

The application atom name for Presentations has been changed from WPPRWin to Presentations.

DLL entries are no longer placed in the Binary Initialization File (BIF). They have been moved to the Windows 95 registry under the key: \HKEY_CURRENT_USER\ Software\ PerfectOffice\ Application\ Third Party\ DLLn\ filename.dll

Exported functions within a DLL no longer requires the _export keyword. I.e. DWORD FAR PASCAL __export TPHVersion.

The following WOAPI structures have been changed:
MAC_PARAM
Added: WORD wReserved

MAC_RETURNVAL
Modified: HSZ hszRequestor to ATOM atomRequestor

MAC_TOKEN
Modified: HSZ hszCommand to MAC_CMD_TYPE eCommand, HSZ hszRequestor to ATOM atomRequestor.
Added: WORD wReserved, MAC_IPCVERSION Version.

MAC_VARIABLE
Modified: HSZ hszCommand to MAC_CMD_TYPE eCommand, HSZ hszRequestor to ATOM atomRequestor.
Added: MAC_IPCVERSION Version, WORD wReserved.

WordPerfect File Format

This list the additions made to the WordPerfect File Format.

Prefix Packet Types

0x1D Prefix Needs Spell-Check

0x1E Formatter Region

0x1F Mideast Flags

0x2A Third Party Data

0x2F Routing Annotation

0x35 Default Native Fonts

0x36 English AFC (Far East)

0x46 IntelliTag Tag with Attributes

0x47 IntelliTag Attribute Text

0x48 IntelliTag LGC Name

0x49 IntelliTag External File Reference

0x4A IntelliTag Notation Attributes

ox4B IntelliTag DTD Entity Reference

0x69 Table Style

0x6D World Wibe Web

0x6E Conversion Font Descriptor

0x77 Formatter Undo State

0x7B Swapped Style Undo

0x7C OBEX ID

0x7D SGML Tag with Attributes

0x7E SGML Attribute Value

0x7F SGML LGC Filename

0x80 SGML External Entity

0x81 SGML Notation with attributes

Single Byte Function Codes

0x99 No Revert

0x9A Optional Space

0x9B Speller Clean On

0x9C Speller Clean Off

0x9D Joiner Control

0x9E Non-Joiner Control

0x9F Weak On

0xA0 Weak Off

0xA1 Decimal Align End

0xA2 Speller Utility On

0xA3 Speller Utility Off

Function and Subfunction codes

0xD11C Line Count

0xD11D Logical Page Flow

0xD317 Define Drop Cap

0xD318 Paragraph Text Direction

0xD319 Asian Wrapping

0xD31A Paragraph Character Count

0xD447 Attached Text (subtitle) Mark (Far East)

0xD448 Text of attached Text (Far East)

0xD449 Attached Text Options (Far East)

0xD44A Ligature Control for Arabic (Middle East)

0xD44B Number Shaping for Arabic (Middle East)

0xD44C Start of Right to Left Text

0xD44D End of Right to Left Text

0xD44E Native Font Change (Middle East)

0xD44F Native Font Size Change (Middle East)

0xD450 Tracked Region On

0xD451 Tracked Region Off

0xD452 Style Example Begin

0xD453 Style Example End

0xD454 Style Prefix Undo

0xD455 Delay Prefix Undo

0xD456 Annotate Insert On

0xD457 Annotate Insert Off

0xD458 Annotate Delete On

0xD459 Annotate Delete Off

0xD45A Speech Recognition Begin

0xD45B Speech Recognition End

0xDA14 Total Number of Pages to Display On

0xDA15 Total Number of Pages to Display Off

0xE120 IntelliTag Start Tag

0xE121 IntelliTag Start Tag End Marker

0xE122 IntelliTag End Tag

0xE123 IntelliTag End Tag End Marker

0xE124 IntelliTag Character Reference

0xE125 IntelliTag Character Reference End Marker

0xE126 IntelliTag Entity Reference

0xE127 IntelliTag Entity Reference End Marker

0xE128 IntelliTag Ignore Content

0xE129 IntelliTag End Ignore Content



Presentations WPG File Format

This list the additions made to the Presentations WPG File Format.

0x38 Poster Settings

0x39 Image State

0x3A Envelope Definition

0x3B Envelope

0x3C Texture Definition

0x3D Brush Texture

0x3E Texture Alignment

0x3F Pen Texture







New in PerfectScript 7



This section describes some of the new and improved features in Perfect Script. It has been compiled to help document some of the major changes to Perfect Script. Emphasis is on new capabilies, and upwards compatibility changes to Perfect Script. There are many additional new tokens that are not listed in this document. Some significant additions have been made in areas of dialogs, registry, math, string handling, and date/time tokens, many of which are not included in this document.

PS70.EXE

New Features:

  • can now debug a macro from the PerfectScript menus
  • the compiler and interpreter are now DLLs rather than EXEs which results in faster compilation and faster running macros
  • added /c-filename command-line option to compile a macro
  • added /x-filename command-line option to debug a macro
  • added /e-filename command-line option to edit a macro for Edit along with Play and Compile from the Win95 Explorer
  • can now compile multiple macros simultaneously
  • smaller and faster macro object
  • an option is provided in preferences to record all product prefixes, even for the default application

New Tools and Utilities:

  • Macro Stripper - Designed to strip the source code from a PerfectScript, leaving the executable code behind. This utility eliminates users from being able to see or modify your macro code. The utility is capable of stripping macro source code from WordPerfect 6.0, 6.1, and 7.0 macro files.
  • Protoype Builder - Designed to build DLL prototypes for PerfectScript, by prompting the user for the needed information in an easy to use Dialog. This file is included with the DLLInsert Prototype utility zip file.

PerfectScript (PS70.EXE) is now tokenized so it is enabled for Third-Party add-ons. In other words, it can now have a Third Party DLL chain. Currently, only a single token is sent:

Check this macro for virus: This token will be passed to the third party chain when a macro is about to be played, but has not yet been opened by PerfectScript. The intent is for a third party DLL to check the macro for a virus, and return a status back to PerfectScript. No message will be given to the user from PerfectScript; all messages to the user must be generated and displayed from within the DLL that is processing this token.

TokenID = 1
Application = "PerfectScript"
ParamCount = 1
Requestor = [will vary]
MacroID = [will vary]
rgParam[0].eType = eParmRawBinary
rgParam[0].uData.lpvPtr = ptr to PlayLibrary structure

Third Party return values:

DLL_HAN_NOT_HANDLED -- no dll checked it, go ahead and play it.
DLL_HAN_NO_ERROR -- a dll looked at it, and said it was good, play it
All other return values -- do NOT play the macro

Dialog Editor and Dialog Statements

Dialog Editor is now modeless so multiple dialogs can be edited simultaneously and the macro code and the dialog can be edited together. Cut, copy, paste between dialogs now supported. From the dialog browser you can copy dialogs to the clipboard. These dialogs can then be pasted into other macros or pasted as textual dialog macro statements into documents or other text editors.

Quick Overview of PerfectOffice 3.0 Macro Compatibility

This section provides a quick overview of things you may need to do to your PerfectOffice 3.0 (WPWin 6.1) macros to make them work in PerfectScript 7. The next section, Modified and Improved Commands and Language Features, provides more extensive details.

  • All DLLCall statements need to be reviewed and possibly changed to accommodate the 32-bit environment. In particular, calls to Windows APIs (in user.dll, kernel.dll, and gdi.dll) will need to be changed to use the 32-bit Windows DLLs and account for any parameter changes.
  • You may have to change variable, label, function names if the name is now a reserved word (ie, if there is a new token with that name like sin, cos, etc.).
  • BIF calls need to be reviewed and possibly changed. Settings for 32-bit applications are stored in the Windows Registry. You can use the new Registry tokens to access settings for Corel Office 7. Other usages of the BIF may or may not work. If another PerfectOffice 3.0 application is running (GroupWise, WordPerfect 6.1, Presentations 3.0, Quattro Pro) then BIFWrite calls will not work on the Public! and Private! BIFs because those applications open the BIF exclusively and thus prevent changes to the file from any other applications.
  • SubStr, NumStr, and StrPos can no longer be used the way they were in WPWin 5.2. This was allowed in WPWin 6.1 as a transition, but is no longer supported.
  • DialogHandle will not work until a DialogLoad or DialogShow has occurred. In PerfectOffice 3.0 it worked as soon as DialogDefine was used.
  • Dialog sizing may need to be adjusted slightly to get the same look as in PerfectOffice 3.0.
  • Calling DialogDismiss on a dialog-editor dialog that does not use a callback will produce an error.
  • The platform name is now Win95! rather than Win!. This allows you to recognize Windows95 separate from Windows 3.x in the IfPlatform statement.



Partial List of Changed Tokens

BIF functions

The BIF commands (BIFFilePath, BIFInfo, BIFRead, BIFWrite) are provided for backward compatibility only and will be removed from the language in a future release. Use the new Registry... commands.

DialogDismiss and DialogDestroy

When using a dialog that is of Macro Dialog Editor (MDE) format (that resides in the prefix area, and can be edited using the Macro Dialog Editor), if the dialog has no callback the dialog is destroyed when the user pushes any button on the dialog. At that point, any subsequent calls referencing that dialog will result in an error. Consider the following macro:
DialogShow ("MDEDlg"; "PerfectScript")

     DialogDismiss ("MDEDlg"; "OKBttn")  // will generate an error
This macro will cause an error when the DialogDismiss token is processed because the macro system no longer knows anything about the dialog. The button push to close the dialog also ended and destroyed it. Consider the following macro which has a callback:
DialogShow ("D_1"; "PerfectScript"; CallHere)

     DialogDismiss ("D_1"; "OKBttn")  // no error, dialog is a

      callback dlg

     DialogDestroy ("D_1")

     Quit

     Label (CallHere)

     Return

DialogShow puts up the dialog, and the macro keeps executing macro instructions, so it would then be dismissed (hidden), and finally destroyed as a result of tokens being sent.

DLLCall

Existing macros that use DLLCall must be rewritten to work in Windows 95. This is because DLLs and the APIs provided by those DLLs either do not exist or have been changed to work in the new 32-bit Windows 95.

IfPlatform

The platform ID for the macro system on Windows 95 is now "Win95!". The platform ID of "Win32!" is also accepted. The old value of "Win" is no longer recognized, and is reserved for 16-bit Windows 3.x.

Prompt

It now accepts a NoButtons! flag to show a prompt without OK or Cancel buttons. This is useful for displaying "Please Wait" messages. When using the NoButtons! flag, you should not use a Pause statement immediately following; rather you should use the EndPrompt method of removing the Prompt. For example:
Prompt ("Prompt with no buttons"; "Please wait for 10

      seconds"; NoButtons!)

     .... other things you do here

     EndPrompt ()
The Prompt command also now accepts a Pause! flag, which will cause the Prompt command to pause until the OK button is pressed (the same as following the Prompt command with a Pause command).

Region tokens (Region...) and user dialog commands (Dialog...) -- clarification on dependancy.

The Region... tokens, can NOT be used on a user dialog until that dialog has either been loaded using DialogLoad or shown with DialogShow. DialogLoad creates the dialog in memory but does not display it. DialogShow displays it.

Partial List of New Commands and Language Features

DialogCallbackArray -- added 2 new elements to the array

[10] will contain the HIWORD of WPARAM
[11] will contain the LOWORD of WPARAM

** exponentiation operator

This operator raises the left operand to the power of the right operand. The precedence level of this operand is between level 1 (NOT, ~, unary +, unary -) and level 2 (*, /, %, DIV, MOD). For example, 2**3 is 8 (2 to the 3rd power).

- string reduction operator

This operator removes the first occurrence of the right string operand from the left string operand. If the right string does not occur within the left string, then the right string is returned unchanged. Just as + for strings returns adds 2 strings together like adding 2 numbers, - for strings removes a string from another like removing a number from another does for numbers. The precedence level of this operand is the same as - for numbers (new precedence level 3). For example, "abcbcdefghi" - "bc" is "abcdefghi" (the first "bc" string removed from "abcbcdefghi").

IN membership operator

This operator returns a boolean value indicating whether the left operand is contained in the right operand. The right operand must always be an array, and the left operand may be a simple value, or may be an array. If the left operand is a simple value, then TRUE is returned if the left operand is equal to one of the elements of the right operand array. If the left operand is an array, then TRUE is returned is every element of the left operand array is equal to some element of the right operand array. The precedence level of this operand is the same as the relational operators (=, <>, !=, <, <=, >, >=) (new precedence level 6). For example, 3 IN {1;2;3} is TRUE, but 3 IN {1;2;4} is FALSE, {1;2;3} IN {1;2;3} is TRUE, {1;2;3} IN {1;2;3;4} is TRUE, but {1;2;3} in {1;2;4} is FALSE.

[0] array element count

This is not a command, but this is an access to the [0] element of an array. When a access to the [0] element of an array is made, the number of elements in the array is returned. This is the same value that is returned from the command Dimensions (array[ ]; 0). Note that only a single zero index is specified, regardless of the number of dimensions the array was declared with.

multi-dimensional array literals:

Can now declare multi-dimensional array content.
a[ ] := {{{1;2}; {3;4}; {5;6}}; {{7;8}; {9;10}; {11;12}}}
a[ ] is a 2 x 3 x 2 array
expandable multi-dimensional array literals:
a[ ] := {{1;...}; {2;3;4}; {5;6;...}}
(The first ... expands (replicates) the value 1 to fill the first dimension (adds 2 more elements), and the second ... expands the value 6 (adds 1 more element) to create a 3 x 3 array.

AppClose (Window)

AppClose closes a running application by sending a WM_CLOSE message to the specified window.
Window can be either a string (possibly containing wildcards) or a window handle returned from AppLocate.

CallbackWait ()

CallbackWait is used to replace a loop after a command (such as DialogDisplay, DialogShow and CoachMessageBox) that requires a callback. CallbackWait pauses the macro allowing only callback to be invoked and executed.

CallbackResume ()

CallbackResume is called to resume the macro after a CallbackWait command has been performed. The macro continues to the next command following the CallbackWait.
Example with while loop:

     DialogShow ("DlgA"; "WordPerfect"; msg)

     loop = True

     While (Loop)

     EndWhile

     Quit
Label (msg) If (msg[5]=274) DialogDestroy ("DlgA") loop = False Return EndIf If (msg[3]="OKBttn") DialogDestroy ("DlgA") loop = False Return EndIf Return
Example with CallbackWait and CallbackResume: DialogShow ("DlgA"; "WordPerfect"; msg) CallbackWait Quit Label (msg) If (msg[5]=274) DialogDestroy ("DlgA") CallbackResume Return EndIf If (msg[3]="OKBttn") DialogDestroy ("DlgA") CallbackResume Return EndIf Return

any := ConvertType (Value:any; Type:enumeration; [DefaultUnitsType:enumeration])

This command forces the macro system to convert the value to the data type specified.
If the Value is a number and the specified Type is a measurement unit type, or the Value is a measurement unit type and the specified Type is a number type, then a measurement unit type conversion is also applied to the magnitude of the value to convert between the measurement unit type and the type specified by the DefaultUnitsType parameter. This can be prevented by specifying None! for the DefaultUnitsType parameter.
If both the Value and the Type are measurement unit types, or both are number types, then the DefaultUnitsType parameter is not used.

Value The value to be converted.

Type The type to convert to.

Boolean! Convert the value to a boolean value.
String! Convert the value to a WP string value.
WPString! Convert the value to a WP string value.
AnsiString! Convert the value to an Ansi string value.
OemString! Convert the value to an Oem string value.
Number! Convert the value to a number value, either a float or an integer. The Value is converted to an integer if the result has no fractional part and will it in the range of an integer.
Float! Convert the value to a float value.
Integer! Convert the value to an integer value.
Measurement! Convert the value to the measurement type specified by the current default units type (specified by the DefaultUnits command).
Centimeters! Convert the value to a centimeters unit value.
Inches! Convert the value to an inches unit value.
Millimeters! Convert the value to a millimeters unit value.
Points! Convert the value to a points unit value.
WPUnits! Convert the value to a WPUnits unit value.
RawBinary! Convert the value to a raw binary data value.

[DefaultUnitsType] The default units value to use when converting between measurements and numbers. If both the Value and the Type are measurement unit types, or both are numeric, then this parameter is not used. If this parameter is missing, then DefaultUnits! is used.

None! Do no number to measurement conversion. This causes no conversion of the magnitude of the numeric value, but simply changes the type of the value. See the None! value of the DefaultUnits command.
DefaultUnits! Assume that numbers are in the units specified by the current default units type. This is the default value.
Centimeters! Assume that numbers are in units of centimeters.
Inches! Assume that numbers are in units of inches.
Millimeters! Assume that numbers are in units of millimeters.
Points! Assume that numbers are in units of points.
WPUnits! Assume that numbers are in units of WPUnits.

DialogLoad (Dialog; Parent)

Loads a dialog without displaying it. After loading, the dialog has been created as a windows entity, and can be manipulated using region commands. Returns the HWND of the dialog if successfully loaded, or NULL if unsuccessful.

DialogSave (Dialog; SaveAsName)

Saves the Dialog as a binary dialog into the current macro file's data store. The dialog is saved with the name in the SaveAsName parameter, which can be the same as the original name. No warning will be given if the names are the same. If the SaveAsName is not given, the file will be saved under the original dialog name.
Returns TRUE (1) if saved successfully, FALSE (0) if unsuccessful.

DialogSetProperties (Dialog; FontName; FontSize; ClassName; HelpFile; HelpString)

Additional properties of a dialog that are supported in Dialog Editor are now here. FontName and FontSize do just what they say. Currently the FontSize must be specified using the measurement type (ie 12p). If the measurement type specifier is left off then the DEFAULT UNITS is assumed. There is currently a bug on this also. The bug number is #2032. It is possible that this command could be changed to behave more like the counter control.
ClassName lets the user specify another dialog class name if desired.
HelpFile and HelpString lets the user specify the helpfile and the portion of the help file to come up along with the dialog. The help string can be obtained the same way a named region can be obtained. The string obtained (very often the named region) is the string used for the help string.

DoesDialogExist (Dialog)

Looks first for the dialog in the "currently in use dialogs" for the macro, and will then look through the use file list for the dialog. Returns TRUE (1) if the dialog is found (exists), or FALSE (0) if the dialog is not found.

numeric := Randomize ([Seed:numeric])

Randomize the random number seed.
[Seed] A seed value to start the random number generator at. If this value is missing, then the current system clock is used to pick a starting seed.

numeric := RandomNumber ([Minimum:numeric] [Maximum:numeric])

Return a random number in a range.
[Minimum] The minimum number to generate.
[Maximum] The maximum number to generate.
If either the Minimum or the Maximum parameter is missing (but not both), then a number between 0 and the specified value is returned. This range included 0, but does not include the specified value. If both Minimum and Maximum are missing, then a number between 0.0 and 1.0 is returned. This includes 0.0, but does not include 1.0.

RegionGetHandle (Region)

Returns the Window Handle of a named region.

RegionGetListCount (Region)

Returns the number of items in a named region list.

RegionGetModified (Region)

Returns TRUE if an edit control has been modified; FALSE otherwise.

RegionSetModified (Region; State)

Sets (or clears) the modified flag on an edit control.

RegistryCloseKey (Hkey)

Hkey is handle of key to close. Returns 0 on success; an error code otherwise.

RegistryCreateKey (Hkey; SubKey)

Hkey is the handle of a starting key or one of the following:
CurrentUser!
ClassesRoot!
LocalMachine!
Users!
SubKey is a string representing the subkey to be created or opened returns new Hkey (0 on error).

RegistryDeleteKey (Hkey; SubKey)

Hkey is handle of a starting key.
SubKey is a string representing the subkey to be deleted. Returns 0 on success; an error code otherwise.

RegistryDeleteValue (Hkey; Value)

Hkey is the handle of a key.
Value is a string representing the value to be deleted; if NULL, empty, or not present, unnamed value is deleted.
Returns 0 on success; an error code otherwise.

RegistryEnumKey (Hkey; SubKeyNumber)

Hkey is the handle of a key.
SubKeyNumber is the number of the subkey you wish to retrieve (starting with zero).
Returns string containing subkey name.

RegistryEnumValue (Hkey; ValueNumber)

Hkey is the handle of a key.
ValueNumber is the number of the value you wish to retrieve (starting with zero).
Returns string containing value name.

RegistryOpenKey (Hkey; SubKey)

Hkey is the handle of a starting key or one of the following:
CurrentUser!
ClassesRoot!
LocalMachine!
Users!
SubKey is a string representing the subkey to be opened (it must exist).
Returns new Hkey (0 on error).

RegistryQueryKeyCount (Hkey)

Hkey is the handle of a key.
Returns the number of subkeys under Hkey.

RegistryQueryLastError ()

Returns the value of last error (0 if last Registry function was successful). The possible error values are:
0 no error
-1 registry token error
100 registry key invalid
101 registry key or value not found
102 index was too large
103 configuration registry key could not be opened
104 configuration registry key could not be read
105 configuration registry key could not be written
106 could not write registry files(s)
107 illegal operation on a deleted registry key
108 cannot create a stable subkey under a volatile parent key
109 could not find the key in the registry
110 invalid value for registry
198 registry or one of its files is corrupt
199 unknown (uncataloged) error

RegistryQueryValueCount (Hkey)

Hkey is the handle of a key.
Returns the number of values under Hkey.

RegistryQueryValue (Hkey; Value; Type)

Hkey is the handle of a key.
Value is the name of the value for which you wish to obtain data. To obtain the "default" (or unnamed) value, the value string should be the empty string ("").
Type is optional and receives the type of the data that was obtained.
Returns data associated with specified value.

RegistrySetValue (Hkey; Value; Data; Type)

Hkey is the handle of a key.
Value is the name of the value for which you wish to set data. To set the "default" (or unnamed) value, the value string should be the empty string ("") and the type should be String.
Data is the data you want to have associated with the specified value.
Type is the format you want the data saved in:
Binary!
DWord!
String!
ExpandableString!
PFBinary!
PFDWord!
PFString!
PFExpandableString!
PFWPString!
PFByte!
PFWord!
PFBool!
Returns 0 on success; an error code otherwise.

string := StrPad (String:string; Length:numeric; [Option:enumeration]; [PadString:String])

Pad a string to a specified length.
return-value The string padded with the specified pad string to the length specified.
String This is the string to be padded.
Length This is the final length that the string should be padded to. If this is <=0, or less than the length of the string, then no padding is done, and the original string is returned.
[Option] This specifies where the padding is to be added. If missing, PadRight! is used.
PadRight! Pad the right end of the string.
PadLeft! Pad the left end (front) of the string.
PadEnds! Pad both ends of the string to cause the string to be centered.
PadWords! Padding should be spread between words to expand the string to the length specified. The words must be separated with any character in the PadString. If no 'words' separated by PadString characters are found, then this will pad the ends like PadEnds!.
[PadString] Multiples of this string of characters are used to pad the string to the specified length. This pad string is not limited to a single character. It may be any string of characters. If this string is missing, then spaces are used. If this string is empty (""), then no padding is done.

string := StrTrim (String:string; [Length:numeric]; [Option:enumeration]; [TrimChars:string or enumeration])

Trim characters from a string.
return-value The string trimmed of the specified characters to the specified length.
String This is the string to be trimmed.
[Length] This is the final length that the specified string should be trimmed to. If this length is greater than the length of the string, then no trimming is done, and the original string is returned. If missing or <=0, the string will be trimmed until all matching characters have been trimmed at the specified location. Once the matching characters are trimmed from the specified location, if the length of the string still exceeds this length, the string will not be shorted any further.
[Option] This specifies where the trimming of characters is done. Characters matching the specified trim characters will be removed from the specified location until the specified length is reached, or until no more matching characters are found. If missing, TrimRight! is used.
TrimRight! Trim characters from the right end of the string.
TrimLeft! Trim characters from the left end (front) of the string.
TrimEnds! Trim characters from both ends of the string to cause the string to be centered.
TrimWords! Multiple TrimChars within the string are to be collapsed to reduce the string to the length. If the length of the string still exceeds the specified length once all multiple TrimChars are collapsed (down to no less than a single one), then the ends will be trimmed like TrimEnds!.
[TrimChars] These characters are to be trimmed from the string. Characters in the specified string that match any character in this string are removed until a character is found that does not match any of these characters. This parameter may either be a string of characters, or an enumeration specifying any combination of the predefined character sets defined below. If missing, then WhiteSpace! is used. Is this string is empty (""), then no trimming is done.
Alphabetic! Characters to be scanned for are the set of alphabetic characters.
AlphaNumeric! Characters to be scanned for are the set of alphanumeric characters.
Numeric! Characters to be scanned for are the set of numeric characters.
Punctuation! Characters to be scanned for are the set of punctuation characters.
WhiteSpace! Characters to be scanned for are the set of whitespace characters.
UpperCase! Characters to be scanned for are the set of upper case characters.
LowerCase! Characters to be scanned for are the set of lower case characters.

string := StrRight (String:string; Length:numeric)

Return the right part of a string.
return-value The rightmost portion of the string of the specified length.
String The string to extract the right part of.
[Length] The length of string to extract from the right of the string. If this length is greater than the length of the string, then the original string is returned. It is not expanded to the specified length. If the length is 0, then an empty string ("") is returned. If the length is missing or <0, then the rightmost non-whitespace characters are returned (leading whitespace is removed).

string := StrLeft (String:string; Length:numeric)

Return the left part of a string.
return-value The leftmost portion of the string of the specified length.
String The string to extract the left part of.
[Length] The length of string to extract from the left of the string. If this length is greater than the length of the string, then the original string is returned. It is not expanded to the specified length. If the length is 0, then an empty string ("") is returned. If the length is missing <0, then the leftmost non-whitespace characters are returned (trailing whitespace is removed).

string := StrFill (Count:numeric; [String:string])

Fill a string multiple times.
return-value A string containing the specified number of copies of the specified string.
Count The number of times to repeat the specified string. If the count is <= 0, then an empty string ("") is returned.
[String ] The string to repeat. If this string is missing, then spaces are used.

string := StrInsert (String:string; [SubString:string]; [Beginning:numeric]; [NumberofChars:numeric])

Insert a substring into a string, replace characters in a string with a substring, or remove characters from a string
return-value The string with the specified substring inserted at the specified location, or the specified number of characters removed from the specified location.
String The string to insert the substring into, or remove characters from.
[SubString The substring to insert. If missing, then no substring is inserted, and characters are removed from String.
[Beginning] The starting position to insert the substring at or remove characters from. If missing, the end of the string is used. If <0, then the absolute value specifies an index relative to the end of the string to start at, where -1 is the index of the last character in the string, and the substring is inserted at this spot, replacing the specified number of characters in the string prior to the beginning index.
[NumberOfChars] The number of characters in the string to replace with the substring. If there is no substring to insert, then this many characters are removed from the string. If missing or 0, then no characters will be removed. If <0, then the remainder of the string starting at Beginning will be removed and replaced with the substring (if present).

enumeration or boolean := ValueType (Value:any; [Type:enumeration])

Return or check the type of a variable or value.
return-value Either a boolean or an enumeration is returned. If the Type parameter is specified, then a boolean is returned indicating whether the value is of the type specified. If the Type parameter is missing, then the actual type of the value is returned as an enumeration:
Boolean!
WPString!
AnsiString!
OemString!
Float!
Integer!
Centimeters!
Inches!
Millimeters!
Points!
WPUnits!
Value The value to be tested. This may be any valid expression, including a variable name.
[Type] The type to test for. If missing, the actual type of the value is returned. If present, a TRUE / FALSE value is returned, indicating whether the value was of this type or not. Several 'generic' types may be specified here. If one of these is specified, then whether the actual value is in this generic category is returned as a boolean:
String! This includes WPString!, AnsiString! and OemString!.
Number! This includes Float! and Integer!.
Measurement! This includes Centimeters!, Inches!, Millimeters!, Points! and WPUnits!.
Numeric! This includes all the Number! and Measurement! types from above.
Boolean! The value must be a boolean value.
WPString! The value must be a WordPerfect string.
AnsiString! The value must be an Ansi string.
OemString! The value must be an OEM string.
Float! The value must be a floating point value.
Integer! The value must be an integer value.
Centimeters! The value must be a centimeters measurement value.
Inches! The value must be an inches measurement value.
Millimeters! The value must be a millimeters measurement value.
Points! The value must be a points measurement value.
WPUnits! The value must be a WP Units measurement value.
Divider

Copyright © 1997 Corel Corporation.
contact info

To contact Customer Service at one of our worldwide locations, click here

Last Updated: September 9, 1996