Cause a computer speaker or installed sound board to beep.
Beep is commonly used with warning messages, or to signal when a macro pauses or finishes a task.
Parameters
BeepType: enumeration (optional) Type of beep to produce. Supported beep types correspond to the types listed in the Windows Sounds Control Panel. If missing, Default! is used.
Default! System default sound ("Default" in Control Panel).
Question! System question sound ("Question" in Control Panel).
Asterisk! System asterisk sound ("Asterisk" in Control Panel).
Exclamation! System exclamation sound ("Exclamation" in Control Panel).
CriticalStop! System stop sound ("CriticalStop" in Control Panel).
Standard! Uses computer's built in speaker sound.
raw binary data := BinaryPack
Example
Syntax
(Value: any; [TotalSize: enumeration or numeric]; {[Offset: enumeration or numeric]; [Type: enumeration]; [Size: enumeration or numeric]})
Description
Pack data into a raw binary data form.
Return Value
Raw binary data returned from BinaryPack.
Parameters
The Offset, Type, and Size parameters form an optional repeating group. Currently, only one group is permitted. If one parameter is used, all must be used. Parameters specify the attributes of the value to be packed into the raw binary data value. Multiple groups may be specified, each describing one value to be packed.
If the Type parameter is Word!, DWord!, or Real!, the Size parameter must be Auto!, or it must agree with the default size for that type (shown in [ ] above).
If Type is Integer! or Boolean!, Size must be Auto!, or it must be 1, 2, or 4.
If Type is WPString! or AnsiString!, Auto! uses the full length of the string plus 1. If Size is larger than the length, the excess data is zero filled. If Size is smaller, only Size (number of) characters is used.
If Type is HexString!, each two-character pair is made into a byte. If Size is shorter, only Size (number of) bytes are produced. If Size is longer, the excess data is zero filled. If Type is Auto!, the full length of the string is used.
Value: any The value to be packed.
TotalSize: enumeration or numeric (optional) The total size of the raw binary data value to produce. This parameter may be specified as a numeric value, or as the enumeration value Auto!
If missing or Auto!, the raw binary data will be the size of all its parts combined.
Offset: enumeration or numeric (optional) The beginning offset (starting at 0) within the raw binary data value to pack Value into. This is the offset of the first byte of the data value. This parameter may be specified as a numeric value, or as the enumeration Auto!. If missing, or specified as Auto!, the next available offset (starting at 0) is used. Any gaps in the final raw binary data value may contain undefined data.
Type: enumeration (optional) The type that Value is packed into. The default size for the Size parameter is shown in [ ]. If missing, Auto! is used.
Auto! Actual data type of Value is used.
Detect! Actual data type of Value is used.
Byte! Pack Value into bytes (1..n bytes [1]).
Word! Pack Value into a word (2 bytes [2]).
DWord! Pack Value into a double word (4 bytes [4]).
Real! Pack Value into a 'C' double (8 bytes [8]).
Integer! Pack Value into a 'C' long (1, 2, 4 bytes [4]).
Boolean! Pack Value into a Windows BOOL (1, 2, 4 bytes [4]).
WPString! Pack Value into a WordPerfect string (2-byte characters [length+1]).
AnsiString! Pack Value into an ANSI string (1-byte characters [length+1]).
HexString! Pack Value into direct binary data from a string of hex characters (1 byte characters [length]).
Size: enumeration or numeric (optional) The size, in bytes, of the raw binary data of Value. This parameter may be specified as a numeric value, or as the enumeration value Auto!. If missing, or specified as Auto!, the default size of Type is used (shown above in [ ]).
Note
In previous versions of PerfectScript, when there was no data to be returned, a single element array with either a numeric value of 0 or a string value of "" was returned. Now, when there is no data to be returned, an empty array will be returned.
any := BinaryUnPack
Example
Syntax
(Value: raw binary data; {Offset: enumeration or numeric; Type: enumeration; Size: enumeration or numeric})
Description
Unpack data from a raw binary data form.
Return Value
Unpacked data returned by BinaryUnPack.
Parameters
The Offset, Type, and Size parameters form a repeating group. At least one group must be specified (only one group is permitted currently). If one parameter is used, all must be used. Parameters specify the attributes of the values to be unpacked from the raw binary data value. Multiple groups may be specified, each describing one value to be unpacked.
If the Type parameter is Word!, DWord!, or Real!, the Size parameter must be Auto!, or it must agree with the default size for that type (shown in [ ] above).
If Type is Integer! or Boolean!, Size must be Auto!, or it must be 1, 2, or 4.
If Type is WPString! or AnsiString!, Auto! uses the full length of the string plus 1. If Size is larger than the length, the excess data is zero filled. If Size is smaller, only Size (number of) characters are used.
If Type is HexString!, each two-character pair is made into a byte. If size is shorter, only Size (number of) bytes are produced. If Size is longer, the excess data is zero filled. If Type is Auto!, the full length of the string is used.
Value: raw binary data The raw binary value to unpack.
Offset: enumeration or numeric The beginning offset (starting at 0) of the value within the raw binary data to unpack. This is the offset of the first byte of the data value. If specified as Auto!, the next available offset (starting at 0) is used.
Type: enumeration Type of value to unpack from the raw binary data. The default size for Size parameter is shown in [ ].
Byte! Unpack the value from a byte (1 byte [1]).
Word! Unpack the value from a word (2 bytes [2]).
DWord! Unpack the value from a double word (4 bytes [4]).
Real! Unpack the value from a 'C' double (8 bytes [8]).
Integer! Unpack the value from a 'C' long (4 bytes [1, 2, 4]).
Boolean! Unpack the value from a Windows BOOL (1, 2, 4 bytes [4]).
WPString! Unpack the value from a WordPerfect string (2-byte characters [to first NULL character]).
AnsiString! Unpack the value from an ANSI string (1-byte characters [to first NULL character]).
HexString! Unpack the value forming a string of hex characters (1 byte [to length specified]).
Size: enumeration or numeric The size, in bytes, that Value is unpacked from. If specified as Auto!, the default size of the Type is used (shown above in [ ]).
boolean := Boolean
Syntax
(<Value>: boolean)
Description
Lets you determine whether a condition is true or false. Use only in OLE Automation call in-line parameter function; pass value as BOOL.
Parameter
<Value>: boolean 0 The condition is false
1 The condition is true
Break
Example
Description
End a loop, and direct macro execution to the first statement after the ending loop.
In a Switch statement, Break directs macro execution to the first statement after EndSwitch. Break bypasses the normal test expression of a loop or conditional statement. Statements after Break are ignored.