Glossary

See Graphic

Glossary




A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


A


ANSI character set

The 256 characters of the American National Standards Institute.

any (data type)

Accepts more than one data type as input. For example, the command AppActivate (Windows: Any). The Windows parameter accepts a window title (string data type) or a window handle (numeric data type).

argument

A variable, constant, or expression required by a command or function.

assignment statement

Assigns the value of an expression to a variable.

Examples

x := "John Doe"

Result: x equals John Doe

y := 5

Result: y equals 5

z := 3 + 4

Result: z equals the result of 3 + 4

The assignment operator (:= or =) assigns the value of a right operand expression to a left operand variable.

-- Top --

B


boolean (data type)

Accepts or returns a value of True or False.

-- Top --

C


callback function

A special function that enables a macro to respond immediately and in specific ways to events such as selecting a radio button or check box, without waiting until a dialog box is dismissed. See PerfectScript DialogShow command.

character expression (string)

One or more characters enclosed in quotation marks, which identifies the characters as text, not a variable.

check box

Displays one or more options. Use a callback function to activate user-defined responses. See PerfectScript DialogAddCheckBox command.

Command Browser

Inserts product and/or programming commands into a macro document. Click the Commands button on the macro toolbar, or use MacroCommandInserter in a macro.

command name

Often describes the action performed by a command, such as Font, MarginLeft, Advance, and FootnoteOptions. Command names execute product features (product commands) or direct the execution of the macro (programming commands, for example, If, Else, End If).

comment statement

Contains notes and other information that do not affect macro play. Use comment statements to explain the purpose of your macro, describe its components, or prevent a statement from playing. Comment statements help if you have to modify a macro months after it is written, or they help if someone else has to understand your macro. A comment begins with // and ends with a hard return [HRt]. See PerfectScript // command.

conditional statement

Plays a statement or group of statements (statement block) when a specified condition is met. Conditional statements are useful for displaying a list of options. A statement block is played depending on which option the user chooses. Conditional statements include Case, If, and Switch. For more information, see Chapter 5: Conditional, Loop, and Calling Statements.

control statement

Alters the sequential execution of macro commands. See Chapter 5: Conditional, Loop, and Calling Statements.

Corel PerfectScript

An application used to record, play, compile, convert, and edit macros. Corel PerfectScript is used to build or edit dialog boxes for macros.

-- Top --

D


data type

Defines the set of values that a variable can store. The data types are numeric, string, measurement, boolean, any, enumeration, and label.

DLL (Dynamic Link Library)

A library of functions and procedures that can be called from a macro.

drop-down list

A type of list available to a Combo Box control. See PerfectScript DialogAddComboBox command.

-- Top --

E


edit box

Receives text input. There are different styles of edit controls, including single line and multiple line. See PerfectScript DialogAddEditBox command.

enumerations

Options provided by the program, such as styles, types, and methods, are called enumerations. They are subsets of parameters. For example, in Corel WordPerfect, On!, Heading8Style!, and DefFlushRight! are enumerations used by different commands. Enumerations always end with exclamation points.

expression

Represents values, and can be arithmetic, numeric, measurement, relational, logical, bitwise, or a character string.

-- Top --

G


global variable

Global creates variables and arrays that pertain to the current macro and to macros called by Run or Chain (see the PerfectScript Chain, Global, and Run commands).

-- Top --

L


label

A subroutine similar to a procedure or function. A label generally contains one or more statements followed by Return or Quit. For more information, see Chapter 5: Conditional, Loop, and Calling Statements.

list box

Displays a list of options to choose from. There are different styles of list boxes, including single-column and multi-column. See PerfectScript DialogAddListBox command.

local variable

Local creates local variables and arrays (they only pertain to the current macro). Variables declared in user-defined functions and procedures are local to those subroutines. When you create a variable by assigning it a value, the variable is automatically declared Local (see PerfectScript Local command).

loop statement

Plays a statement or statement block a specified number of times, until an expression is true or while an expression is true. The macro then exits the loop and continues to the next statement. Loop statements include For, ForNext, ForEach, Repeat, and While. For more information, see Chapter 5: Conditional, Loop, and Calling Statements.

-- Top --

M


macro toolbar

A toolbar that contains tools for writing and editing macros. It contains buttons for saving, compiling, inserting macro commands, and so on. Click Tools > Macros > Macro Toolbar to display it in Corel WordPerfect.

measurement (data type)

All measurement return values are returned in WP units. Necessary unit conversions are done internally when comparing two measurement values. Recorded macros use the units specified in the application settings. When specifying a measurement value in a product command parameter, WordPerfect units (w) are assumed unless other units are specified in the parameter or with the DefaultUnits command.

measurement expression

A number followed by a unit of measure (", i, c, m, p, w).

-- Top --

N


numeric expression

A number on which mathematical operations may be performed. Numeric expressions are not enclosed in quotation marks.

numeric measurement

A data type that accepts a measurement value in inches, millimeters, WP units, and so on. For example, 72P (points) is equal to 1I (inch) and to 2.54C (centimeters).

-- Top --

O


OLE (Object Linking and Embedding)

A feature that copies information from one document to another (embedding), through a "live" link. When the original document changes, the embedded copy reflects the changes.

operator

A symbol or word that performs a function on one or more expressions. Operators compare expressions, link words together, and perform mathematical functions.

-- Top --

P


parameter

Contains a constant value (data) that is passed to the compiler or passed between subroutines. In this Corel Presentations example,

AddSlide (Count: 3; TemplateName: "Title")

AddSlide is the command name, and 3 and "Title" are parameter data. This command adds three slides with the Title template to the current slide show. Parameter names, such as Count and TemplateName, are optional.

A parameter set begins with an open parenthesis and ends with a closed parenthesis. Multiple parameters are separated with a semicolon. Some commands have no parameters, and others have many. Parentheses are optional for commands with no parameters but must be used with user-defined functions and procedures (see Chapter 5: Conditional, Loop, and Calling Statements).

Repeating parameters begin with an open brace ({), end with a closed brace (}), and are separated with a semicolon (;). For example, Menu may list up to 26 items. The following example lists only three:

Menu (vChoice; Digit; 10; 10; {"Item 1"; "Item 2"; "Item 3})

persist variable

Persist creates variables and arrays that pertain to any PerfectScript macro as long as PerfectScript is running (see PerfectScript Persist and PersistAll commands).

product commands

Perform product tasks in a specific application. For example,

ShowSlide(Slide: 4)

displays the fourth slide in the current slide show in Corel Presentations.

product prefix

A two-character expression that specifies a product for a macro command.

programming commands

Direct the play of a macro and are not specific to an application. For example,

If (x = "A")
        ColorAttributesDlg
Else
        LineAttributesDlg
        Endif

displays the Color Attributes dialog box if x equals the value "A", or displays the Line Attributes dialog box if x has any other value. If, Else, and Endif are programming commands. ColorAttributesDlg and LineAttributesDlg are product commands.

Product and programming commands are not case sensitive.

prompt

A message box that displays information for the user.

-- Top --

R


radio button

Displays mutually exclusive options. Use a callback function to activate user-defined responses. See PerfectScript DialogAddRadioButton and DialogShow commands.

relational expression

An expression that evaluates parameters with only two possible states: TRUE and FALSE.

run-time

Execution time. Run-time errors occur during macro execution. Run-time options are application start-up settings, such as the macros default directory.

-- Top --

S


scroll bar

Scroll through documents, or activate user-defined responses with a callback function. See PerfectScript DialogAddScrollBar and DialogShow command.

string

A data type that accepts characters enclosed in double quotation marks.

system variable

Contains current system information such as the current chart type or the default directory. In Corel WordPerfect, system variables begin with a question mark. In Corel Presentations, system variables begin with Env (they return information about the application environment). For example,

vMacroPath := ?PathMacros

assigns the path and name of the default Corel WordPerfect macros directory to a variable named vMacroPath. If you change the directory, the system variable ?PathMacros is updated to reflect the change. The equivalent macro command in Corel Presentations is EnvPaths(Macros!).

subroutine

Consists of a statement or group of statements (statement block) that are played when the subroutine is called (see Chapter 5: Conditional, Loop, and Calling Statements). Subroutines include functions, procedures, and labels.

Example

Call (SubExample)
        ...(other statements)...
Label (SubExample)
        ...statement block...
        Return

Explanation: The calling statement Call (SubExample) calls (directs macro play to) the subroutine Label (SubExample). Return directs macro play to the statement that follows Call (SubExample).

Subroutines are useful because the statements in a subroutine are accessible to any part of a macro, and can be called any number of times during play. See Chapter 5: Conditional, Loop, and Calling Statements.

syntax

Refers to rules that govern the form of macro statements and expressions. For example,

Type(Text: "John Doe")

types John Doe. The next example,

Type(Text: "John Doe"

lacks a closing parenthesis. The syntax is not correct and produces an error message. See Compiler Errors in Chapter 3: Creating Macros for common syntax errors.

-- Top --

T


toggle

A toggle command switches between states. For example, the Corel WordPerfect Bold command can be On! or Off!. If On! or Off! is not specified, Bold "toggles" between the two states each time it is called. If Bold is Off!, it is turned On!. If Bold is On!, it is turned Off!.

-- Top --

U


user-defined dialog box

A custom dialog box created with Dialog programming commands that display options for user input.

-- Top --

V


value set member

A value in an enumeration list. An enumeration is a data type.

variables

Represent data that can change during macro play. Data may include any type of expression, but only one expression at a time. Variable names are user defined, are not case sensitive, must begin with a letter, can include any other combination of letters or numbers, and are limited to 50 characters. For example, in Corel WordPerfect, if you assign 1.0" to variable vMargin, the following commands set one-inch top and bottom margins:

MarginTop (vMargin)
MarginBottom (vMargin)

In Corel Presentations, if you assign the number 50 to variable vPixel, the following command sets Air Brush density to 50 pixels:

SetAirbrushDensity (AirbrushDensity: vPixel)

The lowercase v in vMargin, vTo, vSubject, and vPixel is an optional convention to identify variables. For more information, see Variables in Chapter 4: Expressions.

-- Top --

W


window

Each window has a title bar, a menu bar, and a status bar, and may contain a scroll bar, toolbar, and Ruler. The Equation Editor window has separate editing and display areas called panes.

window handle

A unique identifier for a window or control.

-- Top --