Chapter 4
Corel® Quattro® Pro 8 Product Commands
A - B
{}
{} does nothing; use it to reserve space or insert blank lines in the macro without stopping it. Corel Quattro Pro continues running the macro command following {}.
See {;} and {STEPON} for examples.
{;}
Syntax (Quattro Pro)
{; String}
Parameters
String
Numbers or letters up to 1020.
{;} lets you add explanatory remarks or comments to a macro. When Corel Quattro Pro encounters this macro command, it skips over it.
{;} is a convenient way to temporarily hide other macro commands, such as a branch to an incomplete macro.
Example
This example runs the _int_update subroutine, which calculates interest to date, then branches to the_print_inv subroutine to print the invoice. Notice how the comments embedded in the macro help make it easier to follow.
{; calculate interest to date}
{_int_update}
{ }
{; print the invoice}
{BRANCH _print_inv}
{?}
{?} pauses macro execution and lets macro users press function keys, access menus, and choose commands until Enter is pressed. At that point the macro resumes execution.
Since this command gives users complete program control, use it with caution.
You must append a {CR} or ~ command after the {?} to complete any user entry that requires Enter. For example, if the macro {?} was used, and the user typed 67 then pressed Enter, the value would remain on the input line at the top of the application window even though the macro resumes. {CR} or ~ (or pressing Enter again) would then enter 67 into the cell.
Example
This macro selects cell E15, enters the label Check Number? in the cell to act as a prompt, then passes control to the keyboard so the user can enter a check number. The information the user enters replaces the Check Number? prompt.
{EditGoto E15}
{PUTCELL “Check Number?”}
{?}~
{ABS}
Syntax (Quattro Pro)
{ABS <Number>}
Parameters
Number
1 through 8; 1 = pressing F4 once, 2 = pressing F4 twice, and so on (optional).
{ABS} is equivalent to the Abs key, F4. The {ABS} macro converts relative cell addresses to absolute addresses. Number provides control over what part of the formula converts to an absolute address. {ABS 1} is equivalent to pressing F4 one time with the cell address selected; {ABS 2} is equivalent to pressing F4 twice, and so on, up to 8. If Number is missing, {ABS 1} is assumed.
{ABS} is most commonly used to create absolute addresses, which are handy for referencing a constant value that appears in only one place in a notebook but is copied in several formulas. The advantage of using absolute addresses is that formulas do not have to be edited if the absolute addresses are created before the formula is copied.
Tip
Include the {EDIT} command before {ABS} to make sure Edit mode is active.
Example
The following example converts the formula in the active cell with a relative cell address to an absolute cell address. Then it copies the formula to a new location five cells below and five cells to the right of the active cell.
\A {EDIT}{ABS}~
{BlockCopy C(0)R(0),C(5)R(5)}
{ACTIVATE}
Syntax (Quattro Pro)
{ACTIVATE WindowName}
Syntax (PerfectScript)
Activate (WindowName: String)
Parameters
WindowName
Name of the window to make active.
You can find the name of a window on its title bar.
{ACTIVATE} makes the window specified by the string WindowName active. For example, to make the named chart PROFITS (in the notebook REPORT.WB3) active, use
{ACTIVATE “C:\SALES\REPORT.WB3:PROFITS”}
Use the same syntax for activating dialog windows. To make the notebook itself active, use
{ACTIVATE “C:\SALES\REPORT.WB3"}
{ADDMENU}
Syntax (Quattro Pro)
{ADDMENU MenuPath, MenuBlk}
Syntax (PerfectScript)
AddMenu (MenuPath: String; MenuBlock: String)
Parameters
MenuPath
Location in the menu system to insert a new menu.
MenuBlk
Cells containing a menu definition.
{ADDMENU} lets you add menus to the active menu system. (Use {ADDMENUITEM} to add individual menu commands to the active menu system.) MenuPath is a string that specifies where the new menu should appear. For example, to insert a menu before the Edit menu, use /Edit; to insert a menu before the Copy command on the Edit menu, use /Edit/Copy. You can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu.
You can also use numbers to identify menu commands. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero). When identifying a menu item with numbers, divider lines are considered menu items (for example, /File/5 specifies the first divider line on the File menu, not Properties).
MenuBlk includes the cells containing a menu definition. MenuBlk must include all cells in the new menu.
Tip
You can only add new menus to the menu bar on either side of the Edit and Tools menus—that is, one position to the left or right of the Edit menu and one position to the left or right of the Tools menu. The area between these menu positions is reserved for menus that change depending on the active window. Likewise, you cannot delete menus within this menu, either. You can add menu items to menus between the Edit and Tools menus, but the new menu items will be swapped out of the menu when the context changes.
Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDMENU}, the menu changes appear again.
To restore the original menu bar, use the macro command {SETMENUBAR} without an argument.
{ADDMENUITEM}
Syntax (Quattro Pro)
{ADDMENUITEM MenuPath, Name, <Link>, <Hint>, <HotKey>, <DependString>, <Checked>}
Syntax (PerfectScript)
AddMenuItem (MenuPath: String; ItemName: String; [Link: String]; [Hint: String]; [HotKey: String]; [DependString: String]; [Checked?: Enumeration {Yes!; No!}])
Parameters
MenuPath
Location in the menu system to insert a new menu item; enter the sequence of menu commands separated by forward slashes (/); you can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu. You can also use numbers to identify menu commands. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero).
Name
Name of the command to add; if you want a letter of the name to appear underlined, precede it with an ampersand (&); to add a divider line, type a series of hyphens (-).
Link
Action to perform when the command is chosen (optional); this argument can specify a link command or a macro command to run when the menu item is chosen.
Hint
Help text to display in a popup window when the command is highlighted (optional).
HotKey
Shortcut key that chooses the command (optional); separate key combinations with a plus sign (+), for example, Alt+F4.
DependString
Areas in which the command is available (optional); enter Yes or No for each area, separated by commas, in the following order: desktop, notebook, chart window, dialog window, input line, Objects sheet. Example: “No, No, Yes, No, No, No” makes the menu item available only when the chart window is active.
Checked
Type “Yes” if the command should have a checkmark display by it (optional).
{ADDMENUITEM} is like {ADDMENU}, but inserts a single menu item before MenuPath instead of a new menu.
See the description of {ADDMENU} for the syntax of MenuPath. Name is the name of the new menu item; if a command, precede its underlined letter with an ampersand (&).
Link specifies the actions the menu command performs (for example, “MACRO _remove_file” runs the macro _remove_file).
Tip
You can add menu items to any menu, but if you change a context-sensitive menu (all menus between Edit and Tools on the menu bar), the change only applies to the menu in the active window. For example, suppose you use a macro to change the View menu when the notebook window is active. If you then open a chart window, the chart View menu appears—without the change. If you want the change to apply to that View menu as well, you must run the macro again.
Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDMENUITEM}, the menu changes appear again.
To restore the original menu bar, use the macro command {SETMENUBAR} without an argument.
Example
The following macro adds the menu command Find Object above Edit | Go To. Find Object runs a macro command called _FINDOBJ.
{ADDMENUITEM “/Edit/Go To”,"Find Object", “MACRO _FINDOBJ”, “Finds a floating object on the notebook sheet”, “Ctrl+Shift+F”, “No, Yes, No, No, No, No”, “No”}
{ADDSERIES}
Syntax (Quattro Pro)
{ADDSERIES Block, Name}
Syntax (PerfectScript)
AddSeries (Block: String; Name: String)
Parameters
Block
Cells containing a data series.
Name
Name of the chart to which you want to add a series.
{ADDSERIES} adds a data series to a floating chart. Use {ADDSERIES} as an equivalent to dragging cells onto a chart on a notebook sheet to add a series.
Examples
The following macro adds the series contained in the cells A:E3..E13 to the floating chart named BUDGET:
{ADDSERIES A:E3..E13, BUDGET}
{ADDSUBMENUITEM}
Syntax (Quattro Pro)
{ADDSUBMENUITEM MenuPath, Name, <Link>, <Hint>, <HotKey>, <DependString>, <Checked>}
Syntax (PerfectScript)
AddSubMenuItem (MenuPath: String; ItemName: String; [Link: String]; [Hint: String]; [HotKey: String]; [DependString: String]; [Checked?: Enumeration {Yes!; No!}])
Parameters
MenuPath
Location in the menu system to insert a new menu item; enter the sequence of menu commands separated by forward slashes (/); you can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu. You can also use numbers to identify menu commands. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero).
Name
Name of the command to add; if you want a letter of the name to appear underlined, precede it with an ampersand (&).
Link
Action to perform when the command is chosen (optional); this argument can specify a link command or a macro command to run when the menu item is chosen.
Hint
Help text to display on the status line when the command is highlighted (optional).
HotKey
Shortcut key that chooses the command (optional); separate key combinations with a plus sign (+), for example, Alt+F4.
DependString
Areas in which the command is available (optional); enter Yes or No for each area, separated by commas, in the following order: desktop, notebook, chart window, dialog window, input line, Objects sheet. Example: “No, No, Yes, No, No, No” makes the menu item available only when the chart window is active.
Checked
Type “Yes” if the command should have a checkmark display by it (optional).
{ADDSUBMENUITEM} is like {ADDMENUITEM}, but converts the command indicated by MenuPath into a submenu and adds the new command to the submenu.
Link specifies the actions the submenu command performs (for example, “MACRO _remove_file” runs the macro _remove_file).
Tip
You can add menu items to any menu, but if you change a context-sensitive menu (all menus between Edit and Tools on the menu bar), the change only applies to the menu in the active window. For example, suppose you use a macro to change the View menu when the notebook window is active. If you then open a chart window, the chart View menu appears—without the change. If you want the change to apply to that View menu as well, you must run the macro again.
Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDSUBMENUITEM}, the menu changes appear again.
{Alert}
Syntax (Quattro Pro)
{Alert Title, Message, OKExit?, Type, Icon, DefaultBtn}
Syntax (PerfectScript)
Alert (Title?: Title; Message?: Message; OKExit?: OKExit?; Type?: Type; Icon?: Icon; DefaultBtn?: DefaultBtn)
Parameter
Title
Title of resultant dialog.
Message
Message text of resultant dialog.
OKExit?
Cell to store how the dialog box closed (1 for OK, 2 for Cancel, 3 for Abort, 4 for Retry, 5 for Ignore, 6 for Yes, 7 for No).
Type
0 for dialog with just an OK button, 1 for OK/Cancel, 2 for Abort/Retry/Ignore, 3 for Yes/No/Cancel, 4 for Yes/No, and 5 for Retry/Cancel (optional; 0 is default).
Icon
0 for icon of type Error, 1 for Question, 2 for Warning, 3 for Info (optional; 0 is the default).
DefaultBtn
0 for first button being default, 1 for second, etc.. (optional; 0 is the default).
{Align.Option}
Command equivalent |
Equivalent to |
{Align.Bottom} |
Format | Align | Bottom |
{Align.Horizontal_Center} |
Format | Position | Horizontal Center |
{Align.Horizontal_Space Value} |
Format | Space | Horizontal Space |
{Align.Left} |
Format | Align | Left |
{Align.Right} |
Format | Align | Right |
{Align.Top} |
Format | Align | Top |
{Align.Vertical_Center} |
Format | Position | Vertical Center |
{Align.Vertical_Space Value} |
Format | Space | Vertical Space |
{Align.Option} is the command equivalent for Format | Align; its action depends on whether a chart or dialog window is active.
Value is the amount of space to leave between controls, in pixels.
{ALT}
Syntax (Quattro Pro)
{ALT+Key <Number>}
Parameters
Key
Keyboard macro command (PGUP, DOWN, and so on).
Number
Number of times to repeat the operation (optional).
{ALT} emulates holding down the Alt key while pressing the key specified by Key. Uses of {ALT} that would perform Windows task-switching functions (like Alt+Tab and Alt+Esc) are ignored.
You can combine {ALT}, {CTRL}, and {SHIFT}. For example, {CTRL+SHIFT+D} is equivalent to pressing Ctrl+Shift+D, the Date keys.
Example
{ALT+F} emulates pressing Alt+F, which activates a control in a dialog box with an underlined letter of F.
{AnalysisExpert}
{AnalysisExpert} is the command equivalent for Tools | Numeric Tools | Analysis. The macro has no arguments. {AnalysisExpert} displays the first Analysis Tools Expert dialog box.
{ANOVA1}
Syntax (Quattro Pro)
{ANOVA1 InBlock, OutBlock, <Grouped>, <Labels(0|1)>, <Alpha>}
Syntax (PerfectScript)
ANOVA1 (InBlock: String; OutBlock: String; [Grouped: String]; [Labels?: Enumeration {Yes!; No!}]; [Alpha: Numeric])
Parameters
InBlock
Input cells containing two or more sets of numeric data arranged in columns or rows.
OutBlock
Upper left cell of the output cells.
Grouped
“C” to group results by column or “R” to group results by row; the default is “C”.
Labels
1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0.
Alpha
The significance level at which to evaluate values for the F-statistic; the default is 0.05.
{ANOVA1} performs a one-way analysis of variance. Use {ANOVA1} to test whether two or more samples come from the same population. {ANOVA1} is equivalent to the Anova: One-Way analysis tool.
{ANOVA2}
Syntax (Quattro Pro)
{ANOVA2 InBlock, OutBlock, SampleRows, <Alpha>}
Syntax (PerfectScript)
ANOVA2 (InBlock: String; OutBlock: String; SampleRows: Numeric; [Alpha: Numeric])
Parameters
InBlock
Input cells containing two or more sets of numeric data arranged in columns; the first row must contain labels for each group; the first column must contain row labels indicating the beginning of each sample.
OutBlock
Upper left cell of the output cells.
SampleRows
The number of rows in each sample.
Alpha
The significance level at which to evaluate values for the F-statistic; the default is 0.05.
{ANOVA2} performs a two-way analysis of variance, with more than one sample for each group of data. {ANOVA2} is equivalent to the Anova: Two-Way with Replication analysis tool.
{ANOVA3}
Syntax (Quattro Pro)
{ANOVA3 InBlock, OutBlock, <Labels(0|1)>, <Alpha>}
Syntax (PerfectScript)
ANOVA3 (InBlock: String; OutBlock: String; [Labels?: Enumeration {Yes!; No!}]; [Alpha: Numeric])
Parameters
InBlock
Input cells containing two or more sets of numeric data arranged in columns or rows.
OutBlock
Upper left cell of the output cells.
Labels
1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0.
Alpha
The significance level at which to evaluate the F-statistic; the default is 0.05.
{ANOVA3} performs a two-way analysis of variance, with only one sample for each group of data. {ANOVA3} is equivalent to the Anova: Two-Way Without Replication analysis tool.
{ANSIREAD}
Syntax (Quattro Pro)
{ANSIREAD #Bytes, Location}
Parameters
#Bytes
Number of bytes of characters to read from a file.
Location
Cell in which to store the characters read.
{ANSIREAD} reads #Bytes bytes of characters from a file previously opened using {OPEN} (starting at the current position of the file pointer), and stores them as a label in Location, like {READ} but without any character mapping. This macro is provided for international users. See {READ} for more information.
{ANSIREADLN}
Syntax (Quattro Pro)
{ANSIREADLN Location}
Parameters
Location
Cell in which to store the characters read.
{ANSIREADLN} is like {ANSIREAD}, but instead of using a number of bytes to determine the amount of text to read, {ANSIREADLN} reads forward from the current file pointer location up to and including the carriage-return/linefeed at the end of the line, like {READLN} but without any character mapping. This macro is provided for international users. See {READLN} for more information.
{ANSIWRITE}
Syntax (Quattro Pro)
{ANSIWRITE String,<String2>,<String3,...>}
Parameters
String
String of characters to be written into the open file.
{ANSIWRITE} copies String(s) to a file opened with the {OPEN} command, starting at the location of the file pointer, like {WRITE} but without any character mapping. This macro is provided for international users. See {WRITE} for more information.
{ANSIWRITELN}
Syntax (Quattro Pro)
{ANSIWRITELN String,<String2>,<String3,...>}
Parameters
String
String of characters to be written into the open file as a single line.
{ANSIWRITELN} copies String(s) to a file opened with {OPEN}, starting at the location of the file pointer, and ends the string(s) with the carriage-return and linefeed characters, like {WRITELN} but without any character mapping. This macro is provided for international users. See {WRITELN} for more information.
{Application.Country_Settings}
Syntax (Quattro Pro)
{Application.Country_Settings “Symbol, Prefix|Suffix, Country”}
{Application.Country_Settings} sets the type of currency symbol and its placement before or after values for a particular country.
Tip
This macro replaces previous Corel Quattro Pro macros, {Application.International.Currency_Symbol} and {Application.International.Placement}.
Examples
The following macro sets the currency symbol to $ and places the symbol before values for United States currency values.
{Application.Country_Settings “$,Prefix,United States”}
{Application.Current_File}
{Application.Current_File} returns the name of the active notebook. This command equivalent is only used with @COMMAND and has no equivalent menu command.
{Application.Display.Option}
{Application.Display.Option} |
Equivalent to Tools | Settings... |
{Application.Display “Toolbar, InputLine, Status, RangeSyntax, PropBand, ScrollIndicator, Hint, DefaultView, SheetTabLabel, MinNumSheets, ShowGroupboxAsLine, ShowPreselection, ShowHistoryList”} |
Sets Application Display properties. Equivalent to Tools | Settings | Display. |
Application_Display(; Toolbar?: Yes!|No!; InputLine?: Yes!|No!; Status?: Yes!|No!; RangeSyntax?: A..B:A1..B2|A:A1..B:B2; PropBand?: Yes!|No!; ScrollIndicator?: Yes!|No!; Hint?: Yes!|No!; DefaultView?: Draft!|Page!; SheetTabLabel?: Numbers!|Letters!; MinNumSheets?: Number; ShowGroupboxAsLine?: Yes!|No!; ShowPreselection?: Yes!|No!; ShowHistoryList?: Yes!No!") |
...| Display |
{Application.Display.Default_View Draft|.Page} Application_Display_Default_View(DefaultView?: Draft!|Page!) |
Determines whether new Notebooks come up in Draft view or Page Preview view. Equivalent to Tools | Settings | Display | Default View. |
{Application.Display.History_List Yes|No} Application_Display_History_List(Enable?: Yes!|No!) |
Determines whether to display the File History List off the File menu or not. Equivalent to Tools | Settings | Display | Display last open documents on the File menu. |
{Application.Display.Min_Number_Sheets N} Application_Display_Min_Number_Sheets(Number?: N} |
Sets the default number of sheets on new Notebooks. Equivalent to Tools | Settings | Display | Minimum Number of Sheet Tabs. |
{Application.Display.Range_Syntax “A..B:A1..B2"|”A:A1..B:B2"} |
...| Display | 3-D Syntax |
{Application.Display.Show_GroupBox_As_Line Yes|No} Application_Display_Show_GroupBox_As_Line(Enable?: Yes!|No!) |
Toggles dialog Group Boxes between being a “box”, or just a line above the group. Equivalent to Tools | Settings | Display | Show Groupbox as Line. |
{Application.Display.Show_InputLine Yes|No} |
...| Display | Show Input Line |
{Application.Display.Show_PreSelection Yes|No} Application_Display_Show_PreSelection(Enable?: Yes!|No!) |
Toggles Windows buttons and other controls between being 3-D to being “flat.” Equivalent to Tools | Settings | Display | Show PreSelection. |
{Application.Display.Show_Property_Band Yes|No} |
...| Display | Show Property Bar |
{Application.Display.Show_Scroll_Indicator Yes|No} |
...| Display | Show Scroll Indicators |
{Application.Display.Show_StatusLine Yes|No} |
...| Display | Show Application Bar |
{Application.Display.Sheet_Tab_Label Letters|Numbers} Application_Display_Sheet_Tab_Label(SheetTabName?: Letters!|Numbers!) |
Allows you to choose whether your default sheet tab names are letters (A..IV) or numeric (Sheet1..Sheet256). Equivalent to Tools | Settings | Display | Sheet Tab Label. |
{Application.Display.Show_Tool_Hint Yes|No} |
...| Display | Show QuickTips |
{Application.Display.Show_Toolbar Yes|No} |
...| Display | Show Toolbar |
{Application.Display.Option} is equivalent to choosing Tools | Settings | Display. It lets you specify cell syntax and display parts of the Corel Quattro Pro user interface. The arguments of {Application.Display} (which sets all options of the Display property in one command) use the same syntax as those in the {Application.Display.Option} commands.
Examples
The following macro command hides the standard Toolbar, displays the input line and status line, sets the cell syntax to standard, hides the Property Bar, and displays the scroll indicators and QuickTips.
{Application.Display “No,Yes,Yes,A..B:A1..B2,No,Yes,Yes”}
{Application.Enable_Inspection}
Syntax (Quattro Pro)
{Application.Enable_Inspection Yes|No}
Syntax (PerfectScript)
Application_Enable_Inspection (Enable?: Enumeration {Yes!; No!})
{Application.Enable_Inspection} enables (Yes) or disables (No) Object Inspector menus. It is the command equivalent for choosing Tools | Settings | Enable Inspection, which is only available in Developer mode.
{Application.File_Options.Option}
{Application.File_Options.Option} |
Equivalent to Tools | Settings |
{Application.File_Options StartupDir, AutoFile, FileExt, AutoBackup?(Yes|No), AutoBackupTime, FullPathTitles?(Yes|No), Autoback, QuickTemplates?(Yes|No), QuickTemplateDir, URLUpdateTime, UpdateURL} |
Sets Application File Options properties. Equivalent to Tools | Settings | File Options. |
Application_File_Options(StartupDir?: StartupDir; AutoFile?: AutoFile; FileExt?: FileExt; AutoBackup?: Yes!|No!; AutoBackupTime?: Number; FullPathTitles?: Yes!|No!; AutoBackup?: AutoBack; QuickTemplates?: Yes!|No!; QuickTemplateDir?: Directory; URLUpdateTime?: Number; UpdateURL?: Yes!|No!) |
...| File Options |
{Application.File_Options.AutoBack_Enabled Yes|No} |
...| File Options | Timed document backup every |
{Application.File_Options.AutoBack_Time Integer} |
...| File Options | Timed document backup every N minutes. |
{Application.File_Options.Autoload_File String} |
...| File Options | Autoload File |
{Application.File_Options.AutoRefreshTime N} Application_File_Options_AutoRefreshTime(Time?: N} |
Sets when URLs Refresh. Equivalent to Tools | Settings | File Options | Refresh URLs every N minutes. |
{Application.File_Options.DoRefresh Yes|No} Application_File_Options_DoRefresh(Enable?: Yes!|No!) |
Turns on/off URL Refresh. Equivalent to Tools | Settings | File Options | Refresh URLs every. |
{Application.File_Options.File_Extension String} |
...| File Options | File Extension |
{Application.File_Options.Full_Path_Titles Yes|No} |
...| File Options | Enable Full Path Titles |
{Application.File_Options.QuickTemplates Yes|No} |
...| File Options | Enable QuickTemplates |
{Application.File_Options.Startup_Directory String} |
...| File Options | Default Folder |
{Application.File_Options.TempDir Path} |
...| File Options | QuickTemplates |
{Application.File_Options.WPDialogs Yes|No} |
...| File Options | Use enhanced file dialogs |
{Application.File_Options.Option} is equivalent to choosing Tools | Settings | File Options. It lets you specify the startup folder, autoload file, default file extension, and other options. The arguments of {Application.File_Options} (which sets all options of the File Options property in one command) use the same syntax as those in the {Application.File_Options.Option} commands.
Examples
The following macro command sets the startup folder to C:\COREL\SUITE8, sets the autoload file to QUATTRO.WB3, sets the file extension to .WB3, enables autobackup at 15 minute intervals, enables the display of full path titles, enables QuickTemplates, sets the QuickTemplate folder, and sets the custom @function directory.
{Application.File_Options “C:\COREL\SUITE8\, QUATTRO.WB3, WB3, Yes, 15, Yes, Yes,
C:\COREL\SUITE8\TEMPLATE, C:\COREL\SUITE8"}
{Application.General.Option}
{Application.General.Option} |
Equivalent Tools | Settings... |
{Application.General “UseUndo?(Yes|No), CompatibleKeys?(Yes|No), MoveCellSelectorOnEnter?(Yes|No), DelayTime, Compatible_FormulaEntry?(Yes|No”), FitAsYouGo?(Yes|No); CalcAsYouGo?(Yes|No), QuickType?(Yes|No), CellReferenceChecker?(Yes|No)} |
Sets Application General Options. Equivalent to Tools | Settings | General. |
Application_General(UseUndo?: Yes!|No!; CompatibleKeys?: Yes!|No!; MoveCellOnEnter?: Yes!|No!; ; DelayTime?: Number; CompatibleFormulaEntry?: Yes!|No!; FitAsYouGo?: Yes!|No!; CalcAsYouGo?: Yes!|No!; QuickType?: Yes!|No!; CellReferenceChecker?: Yes!|No!) |
...| General |
{Application.General.Calc-As-You-Go Yes|No} Application_General_Calc-As-You-Go(Enable?: Yes!|No!) |
Turns on/off Calc As You Go. Equivalent to Tools | Settings | General | Calc-As-You-Go. |
{Application.General.Cell_Reference_Checker Yes|No} Application_General_Cell_Reference_Checker(Enable?: Yes!|No!) |
Turns on/off the Cell Reference Checker. Equivalent to Tools | Settings | General | Cell Reference Checker. |
{Application.General.Compatible_Formula_Entry Yes|No} |
...| General | Compatible Formula Entry |
{Application.General.Compatible_Keys Yes|No} |
...| General | Compatible Keys |
{Application.General.Delay_Time Integer} |
...| General | Cell Drag and Drop Delay Time |
{Application.General.Fit-As-You-Go Yes|No} Application_General_Fit-As-You-Go(Enable?: Yes!|No!) |
Turns on/off Fit-As-You-Go, which automatically sizes columns on data entry. Equivalent to Tools | Settings | General | Fit-As-You-Go. |
{Application.General.MoveCellOnEnterKey Yes|No} |
...| General | Move Cell Selector on Enter Key |
{Application.General.QuickType Yes|No} |
Turns on/off QuickType, which finds the the closest match to the label or function you type. Equivalent to Tools | Settings | General | QuickType. |
{Application.General.Undo Yes|No} |
...| General | Undo Enabled |
{Application.General.Option} is equivalent to choosing Tools | Settings | General. It lets you
Examples
The following macro command enables Undo, makes the cell selector move down when you enter data, sets the cell drag and drop delay time to 400 milliseconds, and uses Corel Quattro Pro formula entry.
{Application.General “Yes,No,Yes,Yes,400,No,No,No,No”}
{Application.International.Option}
{Application.International.Option} |
Equivalent to Tools | Settings... |
{Application.International “, Currency, , Negative, Punctuation, DateFmt, TimeFmt, Language, Conversion, Country”} |
...| International |
{Application.International.Currency “Windows Default”|"Corel Quattro Pro"} |
...| International | Currency |
{Application.International.Date_Format String} |
...| International | Date Format |
{Application.International.Language String} |
...| International | Language |
{Application.International.LICS_Conversion Yes|No} |
...| International | Conversion |
{Application.International.Negative Signed|Parens} |
...| International | Negative Values |
{Application.International.Punctuation “1 234,56 (a1.a2)” | “1 234,56 (a1;a2)” | “1 234.56 (a1,a2)” | “1 234.56 (a1;a2)” | “1,234.56 (a1,a2)”| “1,234.56 (a1;a2)” | “1.234,56 (a1;a2)” | “1.234,56 (a1.a2)” | “Windows Default”} |
...| International | Punctuation |
{Application.International.Time_Format String} |
...| International | Time |
{Application.International.Option} is equivalent to choosing Tools | Settings | International, which lets you specify the punctuation, sort order, and numeric formats used by Corel Quattro Pro. The arguments of {Application.International} (which sets all options of the International property in one command) use the same syntax as those in the {Application.International.Option} commands. For example, the Negative argument can be Signed or Parens, the same settings that {Application.International.Negative} accepts.
Tip
To set the currency symbol and its placement either before or after values, use the {Application.Country_Settings}mac_ApplicationCountrySettings macro.
Examples
The following macro command specifies that the Corel Quattro Pro currency format is used with parentheses to indicate negative values, sets the punctuation, sets the date and time formats to Windows defaults, sets the sort order to English, disables LICS conversion, and sets the country used for currency to United States. The entire string must be enclosed within a set of quotes. (Enter all of the example into one cell.)
{Application.International “, Corel Quattro Pro, Parens,”"1,234.56 (a1,a2)"", Windows Default, Windows Default, Corel Quattro Pro, English (American), No, United States"}
{Application.Macro.Option}
{Application.Macro.Option} |
Equivalent to Tools | Settings... |
{Application.Macro “MacSuppress, SlashKey, StartupMacro”} |
...| Macro |
{Application.Macro.Macro_Redraw Both|None|Panel|Window} |
...| Macro | Suppress-Redraw |
{Application.Macro.Slash_Key MenuName} |
...| Macro | Slash Key |
{Application.Macro.Startup_Macro String} |
...| Macro | Startup Macro |
{Application.Macro.Option} is equivalent to choosing Tools | Settings | Macro, which lets you control screen updates, display alternative menu systems, and run startup macros when you open a notebook. The arguments of {Application.Macro} (which sets all options of the Macro property in one command) use the same syntax as those in the {Application.Macro.Option} commands.
Example
The following macro command specifies that windows should not display when a macro runs, makes the slash key display the Corel Quattro Pro for DOS menu system, and sets the startup macro to BUDGET (Corel Quattro Pro will run a macro named BUDGET whenever a notebook is opened containing a macro by that name).
{Application.Macro “Window,Corel Quattro Pro - DOS,BUDGET”}
{Application.Property}
{Application.Property} is equivalent to choosing Tools | Settings. The next table lists the possible settings. Items marked with an asterisk (*) appear only in Developer mode.
To display a property description with syntax, choose that property in the following list:
Property |
Tools | Settings option |
Application.Country_Settings |
Currency | Change |
Application.Current_File |
none |
Application.Display |
Display |
Application.Enable_Inspection |
Enable Inspection |
Application.File_Options |
File Options |
Application.General |
General |
Application.International |
International |
Application.Macro |
Macro |
Application.Title |
Title |
You can use {Application?} or {Application!} to display the Application dialog box. {Application?} lets the user manipulate the dialog box, whereas {Application!} relies on the macro to manipulate it. {Application.Property} is equivalent to Tools | Settings.
{Application.Title}
Syntax (Quattro Pro)
{Application.Title Title}
{Application.Title Title} sets the title appearing in the Corel Quattro Pro title bar. It is equivalent to choosing Tools | Settings | Title, and it is only available in Developer mode.
{ASSIGN}
Syntax (Quattro Pro)
{ASSIGN VarExpr, ValExpr}
Parameters
VarExpr
A variable expression.
ValExpr
A value expression.
The {ASSIGN} macro command is equivalent to the assignment statement variable=value in a programming language.
Examples
{ASSIGN calc, CreateObject(“DispCalc.Application”)} creates an object of the DispCalc application and assigns it to a named variable calc.
{ASSIGN calc.accum, 0} clears the accumulated value of DispCalc.
{ASSIGN calc.accum, @SUM(A1..A10)} assigns the sum of A1..A10 to the accumulated value of DispCalc.
For more details on using {ASSIGN} and other OLE automation macro commands, see OLE Automation.
{Audit.Trace_Precedents}
Syntax (PerfectScript)
Audit_Trace_Precedents()
Traces precedents to current formula.
Equivalent to Tools | Auditing | Trace Precedents.
{Audit.Trace_Dependents}
Syntax (Quattro Pro)
{Audit.Trace_Dependents}
Syntax (PerfectScript)
Audit_Trace_Dependents()
Traces dependents of current formula.
Equivalent to Tools | Auditing | Trace Dependents.
{Audit.Remove_All_Arrows}
Syntax (Quattro Pro)
{Audit.Remove_All_Arrows}
Syntax (PerfectScript)
Audit_Remove_All_Arrows()
Removes all precedent and dependent arrows.
Equivalent to Tools | Auditing | Remove All Arrows.
{BACKSPACE} and {BS}
Syntax (Quattro Pro)
{BACKSPACE <Number>}
Parameters
Number
Any positive integer or the address of a cell containing a positive integer (optional).
{BACKSPACE} and {BS} are equivalent to the Backspace key, which deletes one character to the left of the insertion point in Edit mode. The optional argument Number specifies how many times to repeat the operation; for example, {BACKSPACE 2} is equivalent to pressing Backspace twice.
{BACKTAB}
Syntax (Quattro Pro)
{BACKTAB <Number>}
Parameters
Number
Any positive integer or the address of a cell containing a positive integer (optional).
{BACKTAB} is equivalent to the Shift+Tab key. It is the same as {BIGLEFT}, which moves one cell to the left.
Tip
When the Compatible Keys option of Tools | Settings | General is checked, {BACKTAB} selects the leftmost cell of the screen that is to the left of the current one.
The optional argument Number specifies how many times to repeat the operation; for example, {BACKTAB 3} is equivalent to pressing Shift+Tab three times.
{BEEP}
Syntax (Quattro Pro)
{BEEP <Number>}
Syntax (PerfectScript)
Beep ()
Beep (PerfectScript) does not support the number parameter.
Parameters
Number
1 to 10 (optional).
{BEEP} sounds the computer’s built-in speaker.
Number dictates the tone of the beep. If Number is omitted, {BEEP 1} sounds. If Number is larger than 10, the pattern repeats; for example, {BEEP 11} is the same as {BEEP 1}.
Use {BEEP} to catch the user’s attention. You can use it in interactive macros to introduce a prompt for information or to indicate a macro has finished.
Example
The following macro checks a cell area named error_check for an error condition (indicated by error_check containing zero). If there is no error, it branches to a macro called _continue, which carries on the previous procedure. If there is an error, it gives a low beep, then a medium beep, and moves the selector to the cell area called message_area, where an error message is stored.
{IF error_check = 0}{BRANCH _continue}
{BEEP 1}{BEEP 5}{EditGoto message_area}
{BIGLEFT}
Syntax (Quattro Pro)
{BIGLEFT <Number>}
Parameters
Number
Any positive integer or the address of a cell containing a positive integer (optional).
{BIGLEFT} is equivalent to the Shift+Tab key. It is the same as {BACKTAB}, which moves one cell to the left.
Tip
When the Compatible Keys option of Tools | Settings | General is checked, {BIGLEFT} selects the leftmost cell of the screen that is to the left of the current one.
The optional argument Number specifies how many times to repeat the operation; for example, {BIGLEFT 2} is equivalent to pressing Shift+Tab twice.
{BIGRIGHT}
Syntax (Quattro Pro)
{BIGRIGHT <Number>}
Parameters
Number
Any positive integer or the address of a cell containing a positive integer (optional).
{BIGRIGHT}, like {TAB}, is equivalent to the Tab key, which moves one cell to the right.
Tip
When the Compatible Keys option of Tools | Settings | General is checked, {BIGRIGHT} selects the leftmost cell of the screen that is to the right of the current one.
The optional argument Number specifies how many times to repeat the operation; for example, {BIGRIGHT 2} is equivalent to pressing Tab twice.
{BLANK}
Syntax (Quattro Pro)
{BLANK Location}
Syntax (PerfectScript)
Blank (Blocks: String)
Parameters
Location
Cell(s) you want erased.
{BLANK} erases the contents of the cells referred to as Location. You can also use the command equivalents {ClearContents} and {EditClear} to erase the contents of the currently selected cells.
Example
This macro erases the cells named part_list:
\F {BLANK part_list}
{BlockCopy}
Syntax (Quattro Pro)
{BlockCopy SourceBlock, DestBlock, <ModelCopy?(0|1)>, <Formula?(0|1)>, <Values?(0|1)>, <Properties?(0|1)>, <Objects?(0|1)>, <Row/Col_Sizes?(0|1)>, <Labels?(0|1)>, <Numbers?(0|1)>}
Syntax (PerfectScript)
BlockCopy(SourceBlock: String; DestBlock: String; [ModelCopy?: Enumeration {Yes!; No!}]; [Formulas?: Enumeration {Yes!; No!}]; [Values?: Enumeration {Yes!; No!}]; [Properties?: Enumeration {Yes!; No!}]; [Objects?: Enumeration {Yes!; No!}]; [RowCol_Sizes?: Enumeration {Yes!; No!}]; [Labels?: Enumeration {Yes!; No!}]; [Numbers?: Enumeration {Yes!; No!}])
The last argument is new, and is reserved for Cell Comments.
Parameters
SourceBlock
Cells to copy.
DestBlock
Location to copy cells.
ModelCopy?
Whether to use Model Copy option; 0 = no, 1 = yes; the default is 0.
Formula?
Whether to copy formula cells; 0 = no, 1 = yes; the default is 1.
Values?
Whether to copy value cells; 0 = no, 1 = yes; the default is 1.
Properties?
Whether to copy properties; 0 = no, 1 = yes; the default is 1.
Object?
Whether to copy objects; 0 = no, 1 = yes; the default is 1.
Row/Col_Sizes?
Whether to copy row and column sizes; 0 = no, 1 = yes; the default is 1.
Labels?
Whether to copy label cells; 0 = no, 1 = yes; the default is 1.
Numbers?
Whether to copy number cells; 0 = no, 1 = yes; the default is 1.
{BlockCopy} is the command equivalent for Edit | Copy Cells. It copies the source cells to the specified destination. If ModelCopy? is 1, absolute references to cells within the copied cells adjust to reflect the new location. Formula?, Values?, Properties?, Object?, Row/Col_Sizes?, Labels?, and Numbers? apply only if ModelCopy? is 1.
You can use {BlockCopy?} or {BlockCopy!} to display the Copy Cells dialog box. {BlockCopy?} lets the user manipulate the dialog box, whereas {BlockCopy!} relies on the macro to manipulate it.
{BlockDelete.Option}
Command equivalent |
Equivalent Edit | Delete... |
{BlockDelete.Columns Block, Entire|Partial} |
...| Columns |
{BlockDelete.Pages Block, Entire|Partial} |
...| Sheets |
{BlockDelete.Rows Block, Entire|Partial} |
...| Rows |
{BlockDelete.Option} is the command equivalent for Edit | Delete. It deletes entire or partial columns, rows, and sheets. Block is the 2-D or 3-D selection where material is deleted.
You can use {BlockDelete?} or {BlockDelete!} to display the Delete dialog box. {BlockDelete?} lets the user manipulate the dialog box, whereas {BlockDelete!} relies on the macro to manipulate it.
{BlockFill.Option}
Command equivalent |
Equivalent to Edit | Fill | Fill Series... |
{BlockFill.Block Block} |
...| Cells |
{BlockFill.Go} |
...| OK |
{BlockFill.Order Column|Row} |
...| Fill | Order |
{BlockFill.Series Linear | Growth | Power | Year | Month | Week | Weekday |Day | Hour | Minute | Second} |
...| Fill | Series |
{BlockFill.Start Value} |
...| Fill | Start |
{BlockFill.Step Value} |
...| Fill | Step |
{BlockFill.Stop Value} |
...| Fill | Stop |
{BlockFill.Option} is the command equivalent for Edit | Fill | Fill Series. It fills Block with sequential data. You can use numbers, dates, times, or even formulas for Value.
If {BlockFill.Start} is a number or formula, you can enter one of these strings for {BlockFill.Series}:
If {BlockFill.Start} is a date or time, the fill operation is always linear, but you can specify the step unit as “Year”, “Month”, “Week”, “Weekday”, “Day”, “Hour”, “Minute”, or “Second”. For example, with a start value of 6/20/92, a step value of 2, and “Month” as the {BlockFill.Series Option} setting, the second cell in the filled cells contains August.
You can enter the date and time directly as a serial number or use one of the date and time @functions.
You can use {BlockFill?} or {BlockFill!} to display the Fill Series dialog box. {BlockFill?} lets the user manipulate the dialog box, whereas {BlockFill!} relies on the macro to manipulate it.
Example
The following macro uses @DATEVALUE to enter 6/20/92 as the start value. The 3-D selection to fill is B..C:B1..D4 with a step value of 2. Fill order is “Row”.
{BlockFill.Block B:B1..C:D4}
{BlockFill.Start @DATEVALUE(“6/20/92")}
{BlockFill.Step 2}
{BlockFill.Stop @DATEVALUE(“12/31/2099")}
{BlockFill.Order Row}
{BlockFill.Series Month}
{BlockFill.Go}
{BlockInsert.Option}
Command equivalent |
Equivalent to... |
{BlockInsert.Columns Block, Entire|Partial} |
Insert | Cells | Columns |
{BlockInsert.File FileName, BeforeBlock} |
Insert | File |
{BlockInsert.Pages Block, Entire|Partial} |
Insert |Cells | Sheets |
{BlockInsert.Rows Block, Entire|Partial} |
Insert |Cells | Rows |
{BlockInsert.Option} is the command equivalent for Insert | Cells and Insert | File. It inserts entire or partial columns, rows, and sheets, or complete files. Block is the 2-D or 3-D selection where material is inserted. In {BlockInsert.File}, Filename is inserted into the active notebook before BeforeBlock.
You can use {BlockInsert?} or {BlockInsert!} to display the Insert Cells dialog box. {BlockInsert?} lets the user manipulate the dialog box, whereas {BlockInsert!} relies on the macro to manipulate it.
{BlockMovePages}
Syntax (Quattro Pro)
{BlockMovePages SrcPages, BeforePage}
Syntax (PerfectScript)
BlockMovePages (SrcPages: String; BeforePage: String; [CopyOption?: Enumeration {Yes!; No!}])
Parameters
SrcPages
Range of sheets to move.
BeforePage
New location for SrcPages.
{BlockMovePages} is the command equivalent for Edit | Move Sheets. It reorders sheets within a notebook. Moved sheets appear before BeforePage.
You can use {BlockMovePages?} or {BlockMovePages!} to display the Move Sheets dialog box. {BlockMovePages?} lets the user manipulate the dialog box, whereas {BlockMovePages!} relies on the macro to manipulate it.
{BlockName.Option}
Command equivalent |
Equivalent to Insert | Cell Names... |
{BlockName.Autogenerate Block, LabelsTop?(0|1), LabelsLeft?(0|1), LabelsBottom?(0|1), LabelsRight?(0|1), Intersection?(0|1)} |
...| Generate |
{BlockName.Create BlockName, Block} |
...| Add |
{BlockName.Delete BlockName} |
...| Delete |
{BlockName.Labels Block,Left|Right|Up|Down} |
...| Labels |
{BlockName.MakeTable Block} |
...| Output |
{BlockName.Reset} |
...| Delete All |
{BlockName.Option} is the command equivalent for Insert | Cell Names. It creates, deletes, and displays names for contiguous and noncontiguous selections.
BlockName is the cell name to create or delete. In {BlockName.Create}, Block refers to the cells to name; in {BlockName.MakeTable}, Block indicates where to create the name table. {BlockName.Reset} clears all cell names in the notebook.
You can use {BlockName?} or {BlockName!} to display the Cell Names dialog box. {BlockName?} lets the user manipulate the dialog box, whereas {BlockName!} relies on the macro to manipulate it.
{BlockReformat}
Syntax (Quattro Pro)
{BlockReformat Block}
Syntax (PerfectScript)
BlockReformat (Block: String)
Parameters
Block
The cells to reformat.
{BlockReformat} is the command equivalent for Format | Text Reformat. It adjusts word wrapping in a series of label entries (contained in Block) as though they were in a paragraph.
{BlockTranspose}
Syntax (Quattro Pro)
{BlockTranspose SourceBlock,DestBlock}
Syntax (PerfectScript)
BlockTranspose (SrcBlock: String; DstBlock: String)
Parameters
SourceBlock
Cells to transpose.
DestBlock
Cells to hold transposed copy.
{BlockTranspose} is the command equivalent for Tools | Numeric Tools | Transpose. It copies SourceBlock to another location and reverses its rows and columns. Existing data in DestBlock is overwritten.
You can use {BlockTranspose?} or {BlockTranspose!} to display the Transpose Cells dialog box. {BlockTranspose?} lets the user manipulate the dialog box, whereas {BlockTranspose!} relies on the macro to manipulate it.
{BlockValues}
Syntax (Quattro Pro)
{BlockValues SourceBlock,DestBlock}
Syntax (PerfectScript)
BlockValues (SrcBlock: String; DstBlock: String)
Parameters
SourceBlock
Cells to copy as values.
DestBlock
Cells to hold converted copy.
{BlockValues} is the command equivalent for Edit | Convert to Values. It copies cells to another location and converts their formulas to values. Existing data in DestBlock is overwritten.
You can use {BlockValues?} or {BlockValues!} to display the Convert to Values dialog box. {BlockValues?} lets the user manipulate the dialog box, whereas {BlockValues!} relies on the macro to manipulate it.
{BudgetExpert}
{BudgetExpert} is the command equivalent for Tools | Numeric Tools | Budget. The macro has no arguments. {BudgetExpert} displays the first Budget Expert dialog box.
{BRANCH}
Syntax (Quattro Pro)
{BRANCH Location}
Parameters
Location
Location or name of another macro.
{BRANCH} runs the macro stored in Location. If Location references cells, Corel Quattro Pro starts with the macro command in the top left cell.
{BRANCH} can change the flow of execution based on a condition test. For example, you can use it to run a different macro depending on the contents of a certain cell.
{BRANCH} is like {Subroutine} in that it passes control to another macro. Unlike {Subroutine}, it does not hold your place in the original macro, waiting for control to return. Use {BRANCH} when you do not intend to return to the original macro. To run another macro and then return to the calling macro, use {Subroutine}.
Example
The following macro branches to a macro named _high if the value in cell D10 is greater than 1000; otherwise, it continues to run the macro on the next line:
{IF D10 1000}{BRANCH _high}
{BREAK}
{BREAK} clears any displayed dialog boxes or prompts and returns Corel Quattro Pro to Ready mode. It does not stop macro execution; use {QUIT} for that operation.
{BREAKOFF}
{BREAKOFF} disables Ctrl+Break, which can be used to end a macro before it is done. After {BREAKOFF}, the user will not be able to exit a macro until the end of the macro or until {BREAKON} is used.
Tip
Use {BREAKOFF} only when necessary. Without access to Ctrl+Break, the only way to stop a “runaway” macro is to reboot or turn off the computer.
Example
This macro disables Ctrl+Break while the user inputs a name:
{PUTCELL “Enter your name here:”}
{BREAKOFF}
{?}~
{BREAKON}
{PUTCELL “Try again: ”}
{?}~
{BREAKON}
{BREAKON} enables Ctrl+Break after a previous {BREAKOFF} command has disabled it.
{BREAKON} should be used as soon as possible after {BREAKOFF}, because with Ctrl+Break disabled, the only way to halt a “runaway” macro is to reboot or turn off the computer.
See {BREAKOFF} for an example of {BREAKOFF} and {BREAKON}.