The " " symbol represents a string literal. It is used to specify a literal string value.
; (semicolon)
Description
The semicolon is a parameter separator. Separate parameters in calls to commands with a semicolon.
. (period)
Syntax
PrefixName.CommandName
Description
The period is a command prefix separator. Separate a command prefix from a command name with a period.
Parameters
PrefixName: Variable The name of the prefix
CommandName: Command Name The name of the command
You can use the .. in the following ways:
Syntax 1
CommandName..
Description 1
Lets you specify the default application prefix or the default object prefix. Use the .. to indicate that a command will use the active application or OLE object.
Parameter 1
CommandName:Command Name The name of the command
Syntax 2
StartIndex..EndIndex
Description 2
The .. is an array slice indicator. Separate array indexes with the .. when you want to specify an array slice value.
Parameters 2
StartIndex: Any The start index value
EndIndex: Any The end index value
..
Syntax
CommandName..
Description
Lets you specify the default application prefix or the default object prefix. Use the .. to indicate that a command will use the active application or OLE object.
Parameter
CommandName:Command Name The name of the command
..
Syntax
StartIndex..EndIndex
Description
The .. is an array slice indicator. Separate array indexes with the .. when you want to specify an array slice value.
Parameters
StartIndex: Any The start index value
EndIndex: Any The end index value
You can use the { } in the following ways:
Syntax 1
{Value}
Description 1
Lets you specify an array literal value.
Parameter 1
Value: Any The array literal value
Syntax 2
{Value}
Description 2
Lets you specify a repeating group parameter for a command.
Parameter 2
Value: Any The repeating group parameter
{ }
Syntax
{Value}
Description
Lets you specify an array literal value.
Parameter
Value: Any The array literal value
{ }
Syntax
{Value}
Description
Lets you specify a repeating group parameter for a command.
Parameter
Value: Any The repeating group parameter
You can use the ( ) in the following ways:
Syntax 1
(Value)
Description 1
Lets you specify a parameter list.
Parameter 1
Value: Any The parameter list
Syntax 2
(Expression)
Description 2
Lets you specify an expression.
Parameter 2
Expression: Any The expression
( )
Syntax
(Value)
Description
Lets you specify a parameter list.
Parameter
Value: Any The parameter list
( )
Syntax
(Expression)
Description
Lets you specify an expression.
Parameter
Expression: Any The expression
' '
Syntax
'Value'
Description
Lets you specify a literal array value.
Parameter
Value: String The literal array value
!
Description
The ! is an enumeration terminator. Lets you specify that the preceding name is an enumeration.
Note
An ! must follow every enumeration value.
@
Description
The @ is a label terminator. Lets you specify that the preceding name is a label.
Note
The use of a trailing @ is optional. You must use a trailing @ only if the name of the label is the same as a PerfectScript keyword.
You can use the : in the following ways:
Description 1
The : is a label definition terminator. You can define a label with the : instead of using the Label command.
Description 2
The : is a parameter and value separator. You can separate the name of a parameter from the value of a parameter when you pass a parameter by name to a command.
:
Description
The : is a label definition terminator. You can define a label with the : instead of using the Label command.
:
Description
The : is a parameter and value separator. You can separate the name of a parameter from the value of a parameter when you pass a parameter by name to a command.
b
Description
The b is a binary (base 2) numeric terminator. Lets you specify that the preceding number is to be interpreted as a binary number.
Example
Type (10101b)
// Result: 21
Note
The b terminator can only be used for integer numeric literal values.
o
Description
The o is an octal (base 8) numeric terminator. Lets you specify that the preceding number is to be interpreted as an octal number.
Type (17o)
// Result: 15
Note
The o terminator can only be used for integer numeric literal values.
x
Description
The x is a hexadecimal (base 16) numeric terminator. Lets you specify that the preceding number is to be interpreted as a hexadecimal number.
Type (15x)
// Result: 21
Note
The x terminator can only be used for integer numeric literal values.
h
Description
The h is a hexadecimal (base 16) numeric terminator. Lets you specify that the preceding number is to be interpreted as a hexadecimal number.
Type (oDh)
// Result: 13
Note
The h terminator can only be used for integer numeric literal values.
w
The w is a WPU unit terminator. Lets you specify that the preceding number is to be interpreted as a WPU measurement unit value. One WPU equals 1/1200 of an inch.
Note
The WPU unit terminator can only be used for integer numeric literal values.
c
The c is a Centimeter unit terminator. Lets you specify that the preceding number is to be interpreted as a centimeter measurement unit value.
Note
The Centimeter unit terminator can only be used for integer numeric literal values.
m
The m is a Millimeter unit terminator. Lets you specify that the preceding number is to be interpreted as a millimeter measurement unit value.
Note
The Millimeter unit terminator can only be used for integer numeric literal values.
"
The " is an Inches unit terminator. Lets you specify that the preceding number is to be interpreted as an inches measurement unit value.
Note
The Inches unit terminator can only be used for integer numeric literal values.
i
The i is an Inches unit terminator. Lets you specify that the preceding number is to be interpreted as an inches measurement unit value.
Note
The Inches unit terminator can only be used for integer numeric literal values.
p
The p is a Points unit terminator. Lets you specify that the preceding number is to be interpreted as a points measurement unit value. One point equals 1/72 of an inch.
Note
The Points unit terminator can only be used for integer numeric literal values.
numeric := ~ numeric
Description
Operator. Precedence level 1.
Return Value
Return the bitwise complement of a number (toggles binary value 1 to 0, or 0 to 1).
numeric := numeric ** numeric
Description
Operator. Precedence level 2.
Example
vResult = 2**3
Result: vResult = 8 (2 to the 3rd power)
Return Value
Return the left operand raised to the power of the right operand.
numeric := numeric * numeric
Description
Operator. Precedence level 3.
Return Value
Return the product of two numbers.
numeric := numeric / numeric
Description
Operator. Precedence level 3.
Return Value
Return the floating-point quotient of two numbers.
numeric := numeric % numeric
Description
Operator. Precedence level 3.
Return Value
Return the floating-point division remainder.
+
Description 1
Operator. Precedence level 4.
Return Value 1
Sum of two numbers.
Example 1
vNmbr := 10 + 10
Result: vNmbr = 20
string := string + string
Description 2
Operator. Precedence level 4.
Return Value 2
The result of concatenating two strings.
Example 2
vStr := "abcdefg" + "xyz"
Result: vStr = "abcdefgxyz"
numeric := numeric + numeric
Description
Operator. Precedence level 4.
Return Value
Sum of two numbers.
Example
vNmbr := 10 + 10
Result: vNmbr = 20
string := string + string
Description
Operator. Precedence level 4.
Return Value
The result of concatenating two strings.
Example
vStr := "abcdefg" + "xyz"
Result: vStr = "abcdefgxyz"
-
Description 1
Operator. Precedence level 4.
Return Value 1
Difference between two numbers.
Example 1
vNmbr := 10 - 10
Result: vNmbr = 0
string := string - string
Description 2
Operator. Precedence level 4.
Return Value 2
Result of removing one string from another. If the right string does not occur in the left string, the left string is returned unchanged.
Example 2
vStr := "abcdefg" - "cd"
Result: vStr = "abefg"
numeric := numeric - numeric
Description
Operator. Precedence level 4.
Return Value
Difference between two numbers.
Example
vNmbr := 10 - 10
Result: vNmbr = 0
string := string - string
Description
Operator. Precedence level 4.
Return Value
Result of removing one string from another. If the right string does not occur in the left string, the left string is returned unchanged.
Example
vStr := "abcdefg" - "cd"
Result: vStr = "abefg"
numeric := numeric << numeric
Description
Operator. Precedence level 5.
Return Value
Return the numeric result of shifting bits one or more positions to the left. Bits shifted off the left end are lost. This operator works only on integer data.
numeric := numeric >>> numeric
Description
Operator. Precedence level 5.
Return Value
Return the numeric result of rotating bits one or more positions to the right. Rotated bits off the right end are inserted on the left end of the value. This operator works only on integer data.
numeric := numeric >> numeric
Description
Operator. Precedence level 5.
Return Value
Return the numeric result of shifting bits one or more positions to the right. Bits shifted off the right end are lost. This operator works only on integer data.
numeric := numeric <<< numeric
Description
Operator. Precedence level 5.
Return Value
Return the numeric result of rotating bits one or more positions to the left. Rotated bits off the left end are inserted on the right end of the value. This operator works only on integer data.
boolean := any = any
variable = any
Description
The = operator has two functions.
Relational Operator
Operator. Precedence level 6.
Operator Assigning Value
Operator. Precedence level 10.
Assigns a value to a variable
(synonym for ":=").
Examples
z := {1; 2; 3} = {1; 2; 3}
Result: z = True
z := {1; 2; 3} = {1; 3; 2}
Result: z = False
z := {1; 2; 3} = {1; 2; 3; 4}
Result: z = False
Return Value
Return True if two operands are equal, or False if not.
This operator is defined for values and arrays. Two arrays are equal if they have the same number of dimensions and all corresponding elements are equal.
boolean := any = any
* any := variable = any
*
Description
The = operator has two functions.
Relational Operator
Operator. Precedence level 6.
Operator Assigning Value
Operator. Precedence level 10.
Assigns a value to a variable.
Examples
z := {1; 2; 3} = {1; 2; 3}
Result: z = True
z := {1; 2; 3} = {1; 3; 2}
Result: z = False
z := {1; 2; 3} = {1; 2; 3; 4}
Result: z = False
Return Value
Return True if two operands are equal, or False if not.
This operator is defined for values and arrays. Two arrays are equal if they have the same number of dimensions and all corresponding elements are equal.
boolean := any <> any
Description
Operator. Precedence level 6. Synonym for "!=".
Examples
z := {1; 2; 3} <> {1; 2; 3}
Result: z = False
z := {1; 2; 3} <> {1; 3; 2}
Result: z = True
z := {1; 2; 3} <> {1; 2; 3; 4}
Result: z = True
Return Value
False if two operands are equal, True if not.
This operator is defined for values and arrays. Two arrays are not equal if they have different dimensions or if at least one corresponding element is not equal.
boolean := any != any
Description
Operator. Precedence level 6. Synonym for "<>".
Examples
z := {1; 2; 3} != {1; 2; 3}
Result: z = False
z := {1; 2; 3} != {1; 3; 2}
Result: z = True
z := {1; 2; 3} != {1; 2; 3; 4}
Result: z = True
Return Value
False if two operands are equal, True if not.
This operator is defined for values and arrays. Two arrays are not equal if they have different dimensions or if at least one corresponding element is not equal.
boolean := any < any
Description
Operator. Precedence level 6.
Return Value
True if the left operand is less than the right, False if not. For strings, return True if the left operand alphabetically precedes the right.
boolean := any <= any
Description
Operator. Precedence level 6.
Return Value
Return True if the left operand is less than or equal to the right, False if not. For strings, return True if the left operand alphabetically precedes, or is identical (including case) to the right.
boolean := any > any
Description
Operator. Precedence level 6.
Return Value
Return True if the left operand is greater than the right, False if not. For strings, return True if the right operand alphabetically precedes the left.
boolean := any >= any
Description
Operator. Precedence level 6.
Return Value
Return True if the left operand is greater than or equal to the right, False if not. For strings, return True if the right operand alphabetically precedes, or is identical (including case) to the left.
You can use the & in the following ways:
numeric := numeric & numeric
Description 1
Operator. Precedence level 7.
Return Value 1
Return bitwise AND of two numbers. Bit result is 1 if both bits are 1, 0 if not.
Description 2
Operator.
Return Value 2
Pass the address of the variable
Note
Use only in DLLCall or OLE Automation call in-line parameter function.
numeric := numeric & numeric
Description
Operator. Precedence level 7.
Return Value
Return bitwise AND of two numbers. Bit result is 1 if both bits are 1, 0 if not.
&
Description
Operator.
Return Value
Pass the address of the variable
Note
Use only in DLLCall or OLE Automation call in-line parameter function.
numeric := numeric | numeric
Description
Operator. Precedence level 7.
Return Value
Return the bitwise OR of two numbers. The bit result is 1 if either bit is 1, and 0 if both bits are 0.
numeric := numeric ^ numeric
Description
Operator. Precedence level 7.
Return Value
Return the bitwise XOR (exclusive OR) of two numbers. The bit result is 0 if the bits match, 1 if not.
variable := any
Description
Operator. Precedence level 10. Assign a value to a variable. Synonym for "=" (assignment operator).
// <CommentText>
Example
Description
The compiler ignores all text between // and the next hard return [HRt]. Comment text does not affect macro execution. The comment line, including spaces, has a maximum length of 512 characters.
/* <CommentText> */
Description
The compiler ignores all text between /* and */ (// comments end at the next hard return [HRt]). Comment text does not affect macro execution.
Comment blocks can be nested. If nested, a comment terminator (*/) must occur for every comment start (/*). The count must match. A /* */ statement on a line after // is ignored.
A block of macro statements can be commented out by a comment block with a /* on a line above the statements and a */ on a line below. Without removing /* and */, the statements can be reactivated by putting a // statement before /* and */, which comments out the comment markers.
You can specify a keystring with the following:
#
{0}...{9} //Digits
A
{A}...{Z} //Alphabet
{Alt}
B
{Backspace}
{Bksp}
{Break} //Cancel
C
{CapsLock}
{Clear}
{Control}
{Ctrl}
D
{Del}
{Delete}
{Dn}
{Down}
E
{End}
{Enter}
{Esc}
{Escape}
F
{F1}...{F16} //Function keys
H
{Help} //VK Help key
{Home}
I
{Ins}
{Insert}
L
{Left}
{LeftBrace} // "{"
{LeftButton} // Left mouse click
M
{MiddleButton} // Middle mouse click
{Minus}
N
{Num0}...{Num9} //Numpad numbers
{NumAdd}
{NumDecimal}
{NumDivide}
{NumEnter}
{NumLock}
{NumMultiply}
{NumSubtract}
P
{PageDown}
{PageUp}
{Pause}
{PgDn}
{PgUp}
{PrintScreen}
{PrintScrn}
R
{Right}
{RightBrace} // "}"
{RightButton} // Right mouse click
S
{ScrLock}
{ScrollLock}
{Shift}
{Space}
T
{Tab}
U
{Up}
V
{VKnnn} //nnn = ANSI character number
You can specify a mouse string with the following:
[Alt] Presses ALT + the mouse event.
[At (x, x) | (x, x, x, x)] Lets you specify an exact point (x, x), or rectangle (x, x, x, x) where a mouse event occurs. Point and rectangle positions are relative to the window specified in NamedRegion. The default unit of measure is the pixel.
[Ctrl | Control] Presses CONTROL + the mouse event.
[Left | Middle | Right] Lets you specify whether to click the left, middle, or right mouse button. Left is the default.
[Shift] Presses SHIFT + the mouse event.
[To | In | Inside | On NamedRegion] Lets you specify a screen position for a mouse event.
To
Moves the pointer to the named region if the Action argument is Move; otherwise, To means In
In
The mouse action occurs within the specified named region
Release the mouse button after it is pressed. Use Press with Release for drag.
Move
Move the mouse pointer to the specified location.
Note
Arguments are not case-sensitive. Brackets ( [ ] ) enclose optional values. A vertical bar ( | ) separates values when only one can be chosen. A space separates arguments.
NamedRegion lets you specify a window or location where the mouse action occurs. Named regions are defined by the application. The region consists of the application name followed by a period, followed by additional words that narrow the named region to the appropriate window.