Chapter 4

Macros

Corel® Quattro® Pro 8 Product Commands
E - G


{EDIT}

Syntax (PerfectScript)

Edit()

{EDIT} is equivalent to the Edit key, F2. Its main use is in Edit mode, where it lets you edit the contents of the active cell. You can also use it to search for items in a long list.


{EditClear}

Syntax (PerfectScript)

EditClear()

{EditClear} is the command equivalent for Edit | Clear | Cells. It erases the contents and properties of the current cells, deletes selected objects from dialog and chart windows, and deletes selected floating objects. To erase cells while leaving their properties intact, use {ClearContents}.


{EditCopy}

Syntax (PerfectScript)

EditCopy()

{EditCopy} is the command equivalent for Edit | Copy. It copies the selected object to the Clipboard.


{EditCut}

Syntax (PerfectScript)

EditCut()

{EditCut} is the command equivalent for Edit | Cut. It removes the selected object from the spreadsheet and moves it to the Clipboard.


{EditGoto}

Syntax (Quattro Pro)

{EditGoto Block,<Extend?(0|1)>}

Syntax (PerfectScript)

EditGoto (Block: String; [Extend?: Enumeration {Yes!; No!}])

Parameters

Block

Cells to display and select.

Extend?

Whether to extend the selection from the current selection to the specified cells; 0 = no, 1 = yes; the default is 0.

{EditGoto} is the command equivalent for Edit | Go To. It selects and displays Block within spreadsheet sheets, but not the Objects sheet.

You can use {EditGoto?} or {EditGoto!} to display the Go To dialog box. {EditGoto?} lets the user manipulate the dialog box, whereas {EditGoto!} relies on the macro to manipulate it.


{EditPaste}

Syntax (PerfectScript)

EditPaste()

{EditPaste} is the command equivalent for Edit | Paste. It copies data and its properties from the Clipboard into the notebook.

To paste only values or properties, use {PasteSpecial}. {PasteLink} creates a live DDE link, and {PasteFormat} adds many types of data from other applications (including embedded OLE objects).


{END}

{END} is equivalent to the End key.


{ESC} and {ESCAPE}

{ESC} and {ESCAPE} are equivalent to the Esc key, which is useful for clearing menus or dialog boxes from the screen, one at a time. To clear all prompts and return Corel Quattro Pro to Ready Mode, use {BREAK}.


{EXEC}

Syntax (Quattro Pro)

{EXEC AppName, WindowMode, <ResultLoc>}

Parameters

AppName

Name (in quotes) of the application to run (up to 100 characters).

WindowMode

Size state of the application’s window: 1 or 101 for normal size, 2 or 102 for minimized, 3 or 103 for maximized; use 101, 102, 103 to suspend macro execution until the application terminates.

ResultLoc

Cell containing the coded explanation of the operation’s success.

{EXEC} lets you run other Windows applications or DOS commands. AppName can be any valid command string you could type in the Windows Run dialog box. AppName can contain the path of the application. If no path is given, then the application must be in the system path so Windows can find it.

ResultLoc is useful in some cases where the started application supports DDE along with an instance number. For example, Excel and Corel Quattro Pro respond to their names and also respond to their names concatenated with an instance number.

Examples

{EXEC “C:\COREL\SUITE8\PROGRAMS\WPWIN8.EXE”,2} runs Corel WordPerfect for Windows as a minimized application

{EXEC “NOTEPAD.EXE”,1} runs the Windows Notepad and displays it just as if it were run from the Start button on the taskbar.

{EXEC “C:\COMMAND.COM /C DIR>TEST.TXT”,1} stores the current directory listing in the file TEST.TXT for Windows, except for Windows NT 4.0.

{EXEC “C:\CMD.EXE /C DIR>TEST.TXT”,1} stores the current directory listing in the file TEST.TXT in Windows NT 4.0.


{EXECAUTO}

Syntax (Quattro Pro)

{EXECAUTO AutoExpr1<,AutoExpr2>}

Syntax (PerfectScript)

ExecAuto (AutoExpr1: String; {[AutoExpr: String]})

Parameters

AutoExpr1,2...

One or more automation expressions.

{EXECAUTO} executes one or more methods in another application, but drops any return values.

Examples

{EXECAUTO calc.Display()} asks DispCalc to display its current input value.

{EXECAUTO calc.Button(A1), calc.Display()} passes the value in A1 as an input to DispCalc and asks DispCalc to diplay it.

For more details on using {EXECAUTO} and other OLE automation macro commands, see OLE Automation.


{EXECUTE}

Syntax (Quattro Pro)

{EXECUTE DDEChannel,Macro,<ResultLoc>}

Parameters

DDEChannel

Channel ID number of the application to run a macro in.

Macro

String containing the macro command(s) to run.

ResultLoc

A cell indicating the result of the operation.

With {EXECUTE} you can make other applications that support DDE run their macros. The macro to run is stored in the string Macro. It must be in the syntax the application normally uses (refer to the documentation for each application). You must open a channel of conversation with the other application using {INITIATE} (which determines the value of DDEChannel) before using {EXECUTE}.

The contents of ResultLoc depend on the application you are contacting. Most often, if a macro succeeds, ResultLoc contains 1. If a macro fails, {EXECUTE} results in an error.

See {REQUEST} and {POKE} for more information on receiving data from and sending data to other applications using DDE.

Example

The following example initiates a DDE conversation with Corel WordPerfect’s macro server and opens REPORT.DOC in Corel WordPerfect.

channel 1

{INITIATE “WPWin7_Macros”,"COMMANDS",channel}

{EXECUTE channel,"FileOpen(“”report.doc"")"}

{TERMINATE channel}


{EXPON}

Syntax (Quattro Pro)

{EXPON InBlock,OutBlock,<Damping>,<StdErrs>}

Syntax (PerfectScript)

EXPON (InBlock: String; OutBlock: String; [Damping: Numeric]; [StdErrs?: Enumeration {Yes!; No!}])

Parameters

InBlock

Input cells containing a single column or row with at least four numeric values; the cells must not contain labels.

OutBlock

Upper left cell of the output cells.

Damping

Damping factor used as the exponential smoothing constant; indicates the percentage for error to adjust each prior forecast value; must be ? 0; the default is 0.3.

StdErrs

Flag indicating whether standard errors are included in the output table: yes (1) or no (0); the default is 0.

{EXPON} performs exponential smoothing on a series of values. {EXPON} is equivalent to the Exponential Smoothing analysis tool.


{ExportGraphic}

Syntax (Quattro Pro)

{ExportGraphic Filename,<GrayScale?(0|1)>,<Compression?(0|1)>}

Syntax (PerfectScript)

ExportGraphic (Filename: String; [GrayScale?: Enumeration {Yes!; No!}]; [Compression?: Enumeration {Yes!; No!}])

Parameters

Filename

Name of the graphic file to export.

GrayScale?

Whether to gray-scale: no (0), yes (1); the default is 0.

Compression?

Type of .TIF file compression to use: none (0) or PackBits (1); the default is 0.

{ExportGraphic} is the command equivalent for Chart | Export to File. It saves selected graphic objects to one of several file types with optional gray-scaling and compression.

You can use {ExportGraphic?} or {ExportGraphic!} to display the Export Graphics File dialog box. {ExportGraphic?} lets the user manipulate the dialog box, whereas {ExportGraphic!} relies on the macro to manipulate it.


{FileClose} and {FileCloseAll}

Syntax (PerfectScript)

FileClose ([DoSave?: enumeration {Yes!;No!}])

FileCloseAll ([DoSave?: enumeration {Yes!;No!}])

Command equivalent

Equivalent to ...

{FileClose <DoSave? (0|1)>}

File | Close

{FileCloseAll <DoSave? (0|1)>}

Right-click the Application Bar at the bottom of the screen

{FileClose} closes all views of the active notebook; {FileCloseAll} closes all open notebooks. The optional argument DoSave? indicates whether to display a save prompt before closing files with changes. Use 1, the default, to prompt for changes; 0 suppresses save prompts.


{FileCombine}

Syntax (Quattro Pro)

{FileCombine Filename, <Blocks>, Add | Subtract | Multiply | Divide | Copy}

Syntax (PerfectScript)

FileCombine (FileName: String; [Blocks: String]; Operation: Enumeration {Copy!; Add!; Subtract!; Multiply!; Divide!})

Parameters

Filename

Name of the file to combine.

Blocks

Selection or selections within Filename to combine (optional).

{FileCombine} is the command equivalent for Tools | Data Tools | Combine Files. If you use the “Copy” option, it copies all or part of a notebook into the active notebook (starting at the selected cell). Omit Blocks to combine an entire file. Use “Add”, “Subtract”, “Multiply”, or “Divide” to perform mathematical operations; the incoming data operates on existing data.

You can use {FileCombine?} or {FileCombine!} to display the Combine Files dialog box. {FileCombine?} lets the user manipulate the dialog box, whereas {FileCombine!} relies on the macro to manipulate it.


{FileExit}

Syntax (Quattro Pro)

{FileExit <DoSave?(0|1)>}

Syntax (PerfectScript)

FileExit ([DoSave?: Enumeration {Yes!; No!}])

Parameters

DoSave?

Whether to display a save prompt for modified files: no (0), yes (1); 1 is the default.

{FileExit} is the command equivalent for File | Exit. It closes Corel Quattro Pro. The optional argument DoSave? indicates whether to display a save prompt before closing files with changes. Use 1, the default, to prompt for changes; 0 suppresses save prompts.


{FileExtract}

Syntax (Quattro Pro)

{FileExtract Formulas | Values, Blocks, Filename, <Replace | Backup | Confirm>}

Syntax (PerfectScript)

FileExtract (What: Enumeration {Formulas!; Values!}; Blocks: String; Filename: String; [Option: Enumeration {Confirm!; Replace!; Backup!}])

Parameters

Blocks

Selection or selections to extract.

Filename

Name of the new file containing Blocks.

{FileExtract} is the command equivalent for Tools | Data Tools | Extract to File. It saves part of a notebook to a separate file, leaving the original file intact. Use “Formulas” to retain formulas; use “Values” to convert formulas to values. The optional argument—"Replace", “Backup”, or “Confirm”—indicates how to treat an existing file with the same name (without displaying a prompt).

You can use {FileExtract?} or {FileExtract!} to display the Extract To File dialog box. {FileExtract?} lets the user manipulate the dialog box, whereas {FileExtract!} relies on the macro to manipulate it.


{FileImport}

Syntax (Quattro Pro)

{FileImport “Filename”,"ASCII Text File"|"Comma and “” Delimited File"|"Only Commas"|"Parse Expert"}

Syntax (PerfectScript)

FileImport (Filename: String; Method: String)

{FileImport} copies a text file into the active sheet of a notebook. Enter the option string that describes the type of file to import.

You can use {FileImport?} or {FileImport!} to display the Text Import dialog box. {FileImport?} lets the user manipulate the dialog box, whereas {FileImport!} relies on the macro to manipulate it.


{FileNew}

Syntax (Quattro Pro)

{FileNew <TemplateName>}

Syntax (PerfectScript)

FileNew ([TemplateName: String])

Parameters

TemplateName

The name of a QuickTemplate, as indicated in the Title box in File | Properties | Summary.

{FileNew} is the command equivalent for File | New. It opens a blank notebook or a notebook based on a QuickTemplate.

You can use {FileNew?} or {FileNew!} to display the New File dialog box. {FileNew?} lets the user manipulate the dialog box, whereas {FileNew!} relies on the macro to manipulate it.

FileNew only opens templates in the folder indicated in Tools | Settings | File Options | QuickTemplates.

Examples

The following macro opens a blank notebook:

{FileNew}

The following macro opens a new notebook based on the 7 Year Balloon Loan QuickTemplate:

{FileNew “7 Year Balloon Loan”}


{FileOpen}

Syntax (Quattro Pro)

{FileOpen Filename,<“Open Supporting”|"Update References“|”None “>, <Copy? 0|1>}

Syntax (PerfectScript)

FileOpen (Filename: String; [Option: Enumeration {Open!; Update!; None!}])

Parameters

Filename

Name of the file to open.

Copy

Open as copy, Yes (1) or No (2).

{FileOpen} is the command equivalent for File | Open. It opens the specified file.

You can use {FileOpen?} or {FileOpen!} to display the Open File dialog box. {FileOpen?} lets the user manipulate the dialog box, whereas {FileOpen!} relies on the macro to manipulate it.


{FileRetrieve}

Syntax (Quattro Pro)

{FileRetrieve Filename, <“Open Supporting” | “Update References” |"None “>}

Syntax (PerfectScript)

FileRetrieve (Filename: String; [Option: Enumeration {Open!; Update!; None!}])

Parameters

Filename

Name of the file to retrieve.

{FileRetrieve} loads a notebook into the active notebook, replacing any existing data there.

You can use {FileRetrieve?} or {FileRetrieve!} to display the Retrieve File dialog box. {FileRetrieve?} lets the user manipulate the dialog box, whereas {FileRetrieve!} relies on the macro to manipulate it.


{FileSave}, {FileSaveAll}, and {FileSaveAs}

Syntax (PerfectScript)

FileSave([Option: enumeration {Confirm!; Replace!; Backup!}])

FileSaveAll([Mode: enumeration {Confirm!; Replace!; Backup!}])

FileSaveAs(Filename: string; [Option: enumeration {Confirm!; Replace!; Backup!}]; [reserved: numeric]; [FileType: string])

Command equivalent

Equivalent to...

{FileSave <Replace|Backup|Confirm>}

File | Save

{FileSaveAll <Replace|Backup|Confirm>}

Right-click on the Application Bar at the bottom of the screen

{FileSaveAs Filename, <Replace | Backup | Confirm>, <FileType>}

File | Save As

{FileSave} saves the active notebook, {FileSaveAll} saves all open notebooks, and {FileSaveAs} lets you save the active notebook under another name (Filename). The optional argument—"Replace", “Backup”, or “Confirm”—indicates how to treat a previous version of the file (without displaying a prompt).

The optional <FileType> argument for {FileSaveAs} specifies the type of file to save and is equivalent to the Save File As Type option in the Save File dialog box. If you do not specify a file type, the default is “QPW v6".

You can use {FileSaveAs?} or {FileSaveAs!} to display the Save File dialog box. {FileSaveAs?} lets the user manipulate the dialog box, whereas {FileSaveAs!} relies on the macro to manipulate it.

The following table shows the available file types. For file types with abbreviated names, a short description is provided.

File Types

Description

QPW v7/v8

Corel Quattro Pro for Windows, version 7.0 and 8.0

QPW v6

Corel Quattro Pro for Windows, version 6.0

QPW

Corel Quattro Pro for Windows, version 1.0 and 5.0

QP/DOS

Corel Quattro Pro for DOS

Excel v5/v7

Excel, Version 5.0 and Version 7.0

Excel

Excel, Version 4.0

1-2-3 v4/v5

1-2-3, Version 4 and Version 5

1-2-3 v3.x

1-2-3, Version 3x

1-2-3 v2.x

1-2-3, Version 2x

1-2-3 v1.0

1-2-3, Version 1.0

1-2-3 Ed.

1-2-3, Educational Version

 

Paradox

 

dBASE IV

 

dBASE III

 

dBASE II

 

Text

tab-delimited text

DIF

VisiCalc

SYLK

Multiplan

HTML

Hypertext Markup Language files, Version 3 (for distribution on the Internet’s World Wide Web)

Example

To close all files and save without confirmation, use this macro:

{FileSaveAll Replace}

{FileCloseAll 0}


{FileSend}

Command equivalent

Equivalent to

{FileSend <Filename>}

File | Send To | Mail

{FileSend} is the command equivalent for File | Send To |Mail, which lets you send notebook sheets via one of your mail systems.

Example

{FileSend MYSTATUS.WB3} sends the notebook MYSTATUS.WB3 to another user.


{FILESIZE}

Syntax (Quattro Pro)

{FILESIZE Location}

Parameters

Location

Any cell address or cell name.

{FILESIZE} calculates the number of bytes in a file previously opened using {OPEN} and places the result in Location as a value. If Location refers to cells, the result is placed in the upper left cell of the cells. If the command is successful, macro execution continues in the cell below the cell containing the {FILESIZE} command, ignoring any other commands in that cell. If {FILESIZE} fails (for example, when no file is open), macro execution continues in the cell containing the {FILESIZE} command.

Example

The following example opens the file MYFILE.TXT and places its size (in bytes) in the cell named num_bytes.

\F {OPEN “MYFILE.TXT”,R}

{FILESIZE num_bytes}

{CLOSE}

num_bytes 45


{FileVersion.Retrieve}

Syntax (Quattro Pro)

{FileVersion.Retrieve Filename}

Syntax (PerfectScript)

FileVersion_Retrieve(Filename?: Filename)

Equivalent to File | Version Control | Retrieve Notebook.


{FileVersion.Retrieve_Current}

Syntax (Quattro Pro)

{FileVersion.Retrieve_Current}

Syntax (PerfectScript)

FileVersion_Retrieve_Current()

Equivalent to File | Version Control | Retrieve Current.


{FileVersionSave}

Syntax (Quattro Pro)

{FileVersionSave}

Syntax (PerfectScript)

FileVersionSave()

Equivalent to File | Version Control | Update Current.


{FLOATCOPY}

Syntax (Quattro Pro)

{FLOATCOPY UpperCell, xoffset, yoffset}

Syntax (PerfectScript)

FloatCopy (UpperCell: String; xoffset: Numeric; yoffset: Numeric)

Parameters

UpperCell

Cell containing the new upper left corner of the floating object.

xoffset

Offset in twips from the left edge of UpperCell to the left edge of the floating object.

yoffset

Offset in twips from the top edge of UpperCell to the top edge of the floating object.

{FLOATCOPY} lets you copy a floating object in the active notebook window. The item to copy is selected using {SELECTFLOAT}. The new position in {FLOATCOPY} is specified as a positive offset from a cell in the notebook.

To copy a floating chart to another notebook, specify a notebook as well as a cell for UpperCell.

Examples

The following macro selects the floating chart Inserted1 and copies it to [SALES]A:C10.

{SELECTFLOAT Inserted1}

{FLOATCOPY [SALES]A:C10,0,0}


{FLOATCREATE}

Syntax (Quattro Pro)

{FLOATCREATE Type, UpperCell, xoffset, yoffset, LowerCell, xoffset2, yoffset2, <Text>|StartCorner}

Syntax (PerfectScript)

FloatCreate (Type: String; UpperCell: String; xoffset: Numeric; yoffset: Numeric; LowerCell: String; xoffset2: Numeric; yoffset2: Numeric; [TextOrStartCorner: Any])

Parameters

Type

Floating object to create: Chart, Button, Line, Arrow, Rect, Rounded_Rect, Ellipse, or Text.

UpperCell

Cell containing the upper left corner of the chart or macro button.

xoffset

Offset in twips from the left edge of UpperCell to the left edge of the floating object.

yoffset

Offset in twips from the top edge of UpperCell to the top edge of the floating object.

LowerCell

Cell containing the lower right corner of the chart or macro button.

xoffset2

Offset in twips from the left edge of LowerCell to the right edge of the floating object.

yoffset2

Offset in twips from the top edge of LowerCell to the bottom edge of the floating object.

Text

For Chart, the named chart to display; for Button, the button text.

StartCorner

For Line or Arrow, a number representing the starting corner; 1 = northwest, 2 = northeast, 3 = southeast, 4 = southwest (for example, an arrow pointing up and to the right would have a StartCorner of 4).

{FLOATCREATE} lets you create macro buttons, floating charts, or a draw layer objects (lines, arrows, rectangles, rounded rectangles, ellipses, or text boxes) in the active notebook window. Use {CREATEOBJECT} to create objects in dialog windows or chart windows.

All positions in {FLOATCREATE} are positive offsets from cells in the notebook containing the upper left and lower right corners of the object.

If you need to modify the floating object after creating it, change the property settings immediately after creation. It is selected then, so you will not need to click it or use {SELECTFLOAT}. You might also want to change the name at this time and document it for later use with {SELECTFLOAT}.

Example

The following macro creates a macro button that covers the cells A1..B2, then stores the name of the button in A26. The button reads Save File:

{FLOATCREATE Button,A1,0,0,C3,0,0, “Save File”}

{GETPROPERTY A26, “Object_Name”}

The following macro creates a button 50 twips to the right and 50 twips below the upper left corner of the button in the previous example. It reads Open File:

{FLOATCREATE Button,A1,50,50,C3,50,50, “Open File”}

The following macro creates a floating chart that is offset 35 twips from the cells C2..E10, but the same size:

{GraphNew Chart3}

{FLOATCREATE Chart,C2,35,35,E10,35,35,"Chart3"}

The following macro creates a floating arrow over the cells B8..Dll . The arrow starts at the southwest corner of the cells, and ends with an arrowhead at the northwest corner.

{FloatCreate Arrow,A:B8,0,0,A:D11,945,45,4}

The following macro creates a floating ellipse over the cells E10..E13, then fills the ellipse with a red color.

{FloatCreate Ellipse,A:E10,0,120,A:E13,945,240}

{Setproperty Fill_Color, “255,0,0"}


{FLOATMOVE}

Syntax (Quattro Pro)

{FLOATMOVE UpperCell,xoffset,yoffset}

Syntax (PerfectScript)

FloatMove (UpperCell: String; xoffset: Numeric; yoffset: Numeric)

Parameters

UpperCell

Cell containing the new upper left corner of the floating object.

xoffset

Offset in twips from the left edge of UpperCell to the left edge of the floating object.

yoffset

Offset in twips from the top edge of UpperCell to the top edge of the floating object.

{FLOATMOVE} lets you move a floating object in the active notebook window. The item to move is selected using {SELECTFLOAT}. The new position in {FLOATMOVE} is specified as a positive offset from a cell in the notebook.

To move a floating chart to another notebook, specify a notebook as well as a cell for UpperCell.

Examples

The following macro selects the floating chart Inserted1 and moves it to [SALES]A:C10.

{SELECTFLOAT Inserted1}

{FLOATMOVE [SALES]A:C10,0,0}


{FloatOrder.Option}

Syntax (PerfectScript)

FloatOrder_Backward()

FloatOrder_Forward()

FloatOrder_ToBack()

FloatOrder_ToFront()

Command equivalent

Equivalent to Format | Object Order...

{FloatOrder.ToBack}

...| Send To Back

{FloatOrder.Backward}

...| Send Backward

{FloatOrder.ToFront}

...| Bring To Front

{FloatOrder.Forward}

...| Bring Forward

{FloatOrder.Option} is the command equivalent for Format | Object Order. It works on selected objects to arrange layers of floating charts and other floating objects in the notebook window.


{FLOATSIZE}

Syntax (Quattro Pro)

{FLOATSIZE UpperCell,xoffset,yoffset,LowerCell,xoffset2,yoffset2}

Syntax (PerfectScript)

FloatSize (UpperCell: String; xoffset: Numeric; yoffset: Numeric; LowerCell: String; xoffset2: Numeric; yoffset2: Numeric)

Parameters

UpperCell

Cell containing the new upper left corner of the chart or macro button.

xoffset

Offset in twips from the left edge of UpperCell to the left edge of the floating object.

yoffset

Offset in twips from the top edge of UpperCell to the top edge of the floating object.

LowerCell

Cell containing the new lower right corner of the chart or macro button.

xoffset2

Offset in twips from the left edge of LowerCell to the right edge of the floating object.

yoffset2

Offset in twips from the top edge of LowerCell to the bottom edge of the floating object.

{FLOATSIZE} lets you resize a floating object in the active notebook window. The item to resize is selected using {SELECTFLOAT}.

All positions in {FLOATSIZE} are positive offsets from a cell in the notebook.


{FLOATTEXT}

Syntax (Quattro Pro)

{FLOATTEXT String}

Syntax (PerfectScript)

FloatText (String: String)

Parameters

String

String of characters used to replace text in the text box.

{FLOATTEXT} replaces the text in the selected text box with the specified string. The text box can be on a notebook sheet or in a chart window.

Examples

The following macro selects a floating text box named Text1 and replaces the text in it with “Quarterly Sales Report”.

{SELECTFLOAT Text1}

{FLOATTEXT “Quarterly Sales Report”}


{FOR}

Syntax (Quattro Pro)

{FOR CounterLoc,Start#,Stop#,Step#,StartLoc}

Syntax (PerfectScript)

Look in the command browser under PerfectScript for the equivalent PerfectScript token.

Parameters

CounterLoc

Cell used to track the number of macro iterations.

Start#

Initial value to place in CounterLoc.

Stop#

Maximum value for CounterLoc.

Step#

Amount added to CounterLoc after each iteration.

StartLoc

Cell containing the subroutine to run.

{FOR} repeatedly runs a macro subroutine beginning at StartLoc, creating a macro loop. Corel Quattro Pro keeps track of how long the macro runs using CounterLoc. At the start of the loop, CounterLoc is set to Start#. Each time an iteration of the loop runs, CounterLoc is increased by Step#. When CounterLoc reaches or exceeds Stop#, execution stops.

Examples

{FOR D15,1,5,1,E30} runs the subroutine beginning in cell E30 five times.

{FOR D15,1,10,2,E30} runs the subroutine five times because the counter increments by two during each iteration.

{FOR D15,1,5,0,E30} runs the subroutine continuously until you press Ctrl+Break, because adding 0 to the start value of 1 can never make the counter exceed 5.

{FOR D15,1,0,1} results in an error because no subroutine is specified.

The following macro creates “Qtr” labels for reports; the year displays above Qtr1:

\Q {; position cursor where labels should appear}

{FOR counter, 1994,1997,1,_list}

{; return to original position}

{LEFT}{END}{LEFT}

counter

_list {PUTCELL +counter}

{DOWN}

{PUTCELL “Qtr1"}{RIGHT}

{PUTCELL “Qtr2"}{RIGHT}

{PUTCELL “Qtr3"}{RIGHT}

{PUTCELL “Qtr4"}{RIGHT 2}{UP}


{FORBREAK}

{FORBREAK} cancels the subroutine run by a {FOR} command and ends the processing of {FOR}. Macro execution continues normally with the command following the {FOR} command.

If {FORBREAK} appears anywhere other than in a subroutine called by {FOR}, macro execution ends, and Corel Quattro Pro displays an error message.

{FORBREAK} is usually used in conjunction with {IF} to exit the macro if a specific condition is reached; for example, if an error condition is found.

Example

The following example shows {FORBREAK} terminating a loop used to enter names into a list. Enter STOP to stop the loop.

\F {EditGoto list_top}

{FOR counter,1,10000,1,_get_name}

_get_name {GETLABEL “Enter next name: ”,name_cell}

{IF name_cell="STOP"}{FORBREAK}

{LET @CELLPOINTER(“Address”),name_cell}{DOWN}

name_cell STOP

counter 4

list_top


{FOURIER}

Syntax (Quattro Pro)

{FOURIER InBlock,OutBlock,<Inverse>}

Syntax (PerfectScript)

FOURIER (InBlock: String; OutBlock: String; [Inverse?: Enumeration {Yes!; No!}])

Parameters

InBlock

One or more numeric cell values representing the input cells; can be real or complex numbers; the number of values in InBlock must be a power of 2 between 2 and 1024 inclusive (for example, 2, 4, 8, 16,...); if the number of values in InBlock does not equal a power of 2, pad the cells with additional zeros.

OutBlock

Upper left cell of the output cells.

Inverse

0 to perform a Fourier transformation; 1 to perform the inverse Fourier transformation; the default is 0.

{FOURIER} performs a fast Fourier transformation on cells of data. {FOURIER} is equivalent to the Fourier analysis tool.


{Frequency.Option}

Command Equivalent

Equivalent to Tools | Numeric Tools | Frequency...

{Frequency.Bin_Block Block}

...| Bin Cells

{Frequency.Go}

...| OK

{Frequency.Reset}

...| Reset

{Frequency.Value_Block Block}

...| Value Cells

Syntax (PerfectScript)

Frequency_Bin_Block(Block: string)

Frequency_Go ()

Frequency_Reset ()

Frequency_Value_Block (Block: string)

{Frequency.Option} is the command equivalent for Tools | Numeric Tools | Frequency. It counts the number of cases in the value Block that fall within each interval specified in the bin Block. Use {Frequency.Bin_Block} and {Frequency.Value_Block}, then {Frequency.Go}. You can use {Frequency.Reset} before or after the other commands to clear current settings.

You can use {Frequency?} or {Frequency!} to display the Frequency Tables dialog box. {Frequency?} lets the user manipulate the dialog box, whereas {Frequency!} relies on the macro to manipulate it.

Example

The following macro counts the data in cells C1..E13 of sheet A and groups it according to the intervals given in G1..G7; frequencies display in column H.

{Frequency.Value_Block A:C1..E13}

{Frequency.Bin_Block A:G1..G7}

{Frequency.Go}


{FTESTV}

Syntax (Quattro Pro)

{FTESTV InBlock1,InBlock2,OutBlock,<Labels>}

Syntax (PerfectScript)

FTESTV (InBlock1: String; InBlock2: String; OutBlock: String; [Labels?: Enumeration {Yes!; No!}])

Parameters

InBlock1

The first input cells containing a column or row of numeric values.

InBlock2

The second input cells containing a column or row of numeric values.

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.

{FTESTV} performs a two-sample F-test to compare population variances. {FTESTV} is equivalent to the F-Test analysis tool.


{FUNCTIONS}

{FUNCTIONS} is equivalent to the Functions key, Alt+F3, which displays a list of @functions to enter in the input line.


{GET}

Syntax (Quattro Pro)

{GET Location}

Parameters

Location

Cell in which to store the keystroke entered by the user.

{GET} pauses macro execution, accepts one keystroke from the user (no carriage return is necessary), and stores the keystroke as a macro command in Location. It then continues macro execution. Any Corel Quattro Pro keystroke can be recorded with {GET} except Shift+F2, Pause, Caps Lock, Num Lock, and Scroll Lock. Unlike {?}, the keystroke is not passed to Corel Quattro Pro.

{GET} is useful for creating macros that run in the background while the user works. It can detect each key, and restrict the actions the user performs. You can use {LOOK} with {GET} to check the typeahead buffer for user response.

Example

The following example asks users if they want to continue.

\F {RIGHT 10}

{; display msg_area in top left of screen}

{GOTO}msg_area~

_again Press Y to continue...~

{GET keystroke}

{IF keystroke<>"Y"}{BEEP2}{HOME}{QUIT}

{BEEP 4}{BRANCH _again}

keystroke

msg_area Press Y to continue...


{GETDIRECTORYCONTENTS}

Syntax (Quattro Pro)

{GETDIRECTORYCONTENTS Block,<Path>}

Syntax (PerfectScript)

GetDirectoryContents (Block: String; [Path: String])

Parameters

Block

Cells to enter list of files into.

Path

Path and wildcard specifying the list (optional).

{GETDIRECTORYCONTENTS} enters an alphabetized list of file names (determined by the path and DOS wildcard specified by Path) into Block; if Path is not included, {GETDIRECTORYCONTENTS} lists all the files in the current directory. Path must contain a DOS wildcard like *.BAT or *.*.

Tip

If Block is one cell, {GETDIRECTORYCONTENTS} overwrites any information beneath the cell (if it finds more than one file). To restrict the file names to specific cells, set Block to more than one cell.

Examples

{GETDIRECTORYCONTENTS A2,"C:\*.*"} fills column A (starting at row 2) with a list of the files in the root directory of drive C.

{GETDIRECTORYCONTENTS A2..C7,"C:\COREL\SUITE8\*.*"} fills the cells A2..C7 with a list of the files in the Corel Quattro Pro directory on drive C. The first filename is stored in A2, the second in B2, and so on. If more than 18 files are found, the cells are only filled with the first 18.

{GETDIRECTORYCONTENTS C7,"C:\COREL\SUITE8\SAMPLES\*.W??"} fills column C (starting at row 7) with a list of the files in the COREL\SUITE8\SAMPLES directory on drive C that have file extensions beginning with W.


{GETLABEL}

Syntax (Quattro Pro)

{GETLABEL Prompt,Location}

Parameters

Prompt

String displayed to the user as a prompt.

Location

Cell in which to store the user’s response; when {GETLABEL} is used in OLE automation, Location can also be a named variable.

{GETLABEL} pauses macro execution, displays Prompt in a dialog box, and accepts keystrokes until the user chooses OK or presses Enter. At that time, Corel Quattro Pro stores the characters typed as a label in Location. Unlike {GET}, it does not accept Corel Quattro Pro’s special keys (for example, Home).

Prompt can be a literal string, such as “Enter date:”, or a text formula such as +B6 (which contains a label). The prompt string itself can be up to 70 characters long, and is truncated if longer. The response can be as long as 160.

If {PANELOFF} is in effect, {GETLABEL} ignores it, letting the menus, status line, and input line be viewed and updated as the input is typed. Once input is completed (indicated by Enter or choosing OK), then these portions of the display are turned off again.

Examples

This example displays the label in B6 as the dialog box prompt, and then stores the result in cell D1:

{GETLABEL +B6,D1}

The following example stores the user’s last name in the cell named last_cell:

\F {GETLABEL “Enter your last name:”,last_cell}

last_cell


{GETNUMBER}

Syntax (Quattro Pro)

{GETNUMBER Prompt,Location}

Parameters

Prompt

String displayed to the user as a prompt.

Location

Cell in which to store the user’s response; when {GETNUMBER} is used in OLE automation, Location can also be a named variable.

{GETNUMBER} is like {GETLABEL}, but accepts only a numeric value, a formula resulting in a numeric value, or the cell address or cell name of a cell returning a value. If a text value is input, ERR is entered in the cell. The prompt can be up to 70 characters long, and the response can be as long as 160 characters.

Example

The following example stores the user’s age in the cell named age_cell. If a number is not entered, which the macro detects by checking to see whether age_cell contains ERR, it prompts again.

\F {GETNUMBER “Enter your age:”,age_cell}

{IF @ISERR(age_cell)}{BRANCH \F}

age_cell


{GETOBJECTPROPERTY}

Syntax (Quattro Pro)

{GETOBJECTPROPERTY Cell,Object.Property}

Syntax (PerfectScript)

GetObjectProperty (Cell: String; ObjectProperty: String)

Parameters

Cell

Cell in which to store the property setting.

Object

Name of the object to study.

Property

Property of the object to study.

{GETOBJECTPROPERTY} lets you view objects in Corel Quattro Pro without using the mouse, including objects normally not selectable (like the application title bar). Selectable objects, such as blocks and annotations, can also be studied with {GETPROPERTY}. See {SETOBJECTPROPERTY} for the syntax of Object.Property.

Examples

{GETOBJECTPROPERTY A23,"Active_Notebook.Zoom_Factor"} stores the Zoom Factor property’s current setting in cell A23.

{GETOBJECTPROPERTY B42,"/File/Exit.Enabled"} stores whether File | Exit is operational or not in the cell B42.


{GETPOS}

Syntax (Quattro Pro)

{GETPOS Location}

Parameters

Location

Cell in which to store the retrieved value.

{GETPOS} places the position of the file pointer in Location as a value. If no file has been opened using {OPEN}, the command is ignored.

The file pointer is a number corresponding to the position at which the next character written to the file will be placed. If the file pointer is 0, the next character written to the file with {WRITE} or {WRITELN} is placed at the beginning of the file. If the file already contains information, it is overwritten, beginning at the first position in the file. After the file is written to, the file pointer is positioned immediately after the last character written. If a file is newly created, then written to for the first time, the file pointer will be the size of the file.

If {GETPOS} succeeds, macro execution continues in the cell below the cell containing the {GETPOS} command, ignoring any commands in the same cell as {GETPOS}; if {GETPOS} fails, macro execution continues in the same cell.

Example

The following example opens the text file TEST.TXT, reads in a line, and calculates the length of the line by subtracting the starting position from the ending position and subtracting 1 from the result. This adjustment is necessary because the carriage return and linefeed characters (found at the end of each line in a typical text file) are stripped away by Corel Quattro Pro when the text is read into cells. So, the calculated length is one character longer than the actual length. The text file read here was created by the macro example provided in the {WRITELN} command description.

\F {OPEN “A:TEST.TXT”,R}

{GETPOS start}

{READLN input}

{GETPOS end}

{CLOSE}

{LET num_char,+(end-start)-1}

input This is a short line.

start 0

end 22

num_char 21


{GETPROPERTY}

Syntax (Quattro Pro)

{GETPROPERTY Cell,Property}

Syntax (PerfectScript)

GetProperty (Cell: String; PropertyName: String)

Parameters

Cell

Cell in which to store the property setting.

Property

Property of the selected object to study.

{GETPROPERTY} lets you study the property settings of whatever object is selected. Property is the property to view (see Property Reference for a list of properties); its setting is stored in Cell.

Examples

{GETPROPERTY A23,"Text_Color"} stores the Text Color setting of the selected object in the cell A23.

{GETPROPERTY B42,"Box_Type"} stores the border style of the selected object in cell B42.


{GETWINDOWLIST}

Syntax (Quattro Pro)

{GETWINDOWLIST Block}

Syntax (PerfectScript)

GetWindowList (Block: String)

Parameters

Block

Cells to store window names in.

{GETWINDOWLIST} stores a list of the windows open on the Corel Quattro Pro desktop in Block, including dialog windows and chart windows. Windows hidden by Window | Hide are not included.

Tip

If Block is one cell, {GETWINDOWLIST} overwrites any information beneath the cell (if it finds more than one window open). To restrict the window names to specific cells, set Block to more than one cell.

Example

{GETWINDOWLIST A2..C5} stores a list of open windows in the cells A2..C5. The first window name is stored in A2, the second in B2, and so on. If more than twelve windows are open, only the first twelve are stored in the cells.


{GOTO}

{GOTO} lets you move the selector to a specific location.

A related macro, {QGOTO}, selects the cell or cells specified as its destination, while {GOTO} moves to the cell in the upper-left corner of the specified cells.

This command is for compatibility with Corel Quattro Pro for DOS; use {EditGoto} as the command equivalent for Edit | Go To.


{GRAPH}

{Graph} is equivalent to the Chart key, F11, which displays the current chart.


{GRAPHCHAR}

Syntax (Quattro Pro)

{GRAPHCHAR Location}

Parameters

Location

Cell address or the cell name where the returned character should be stored.

{GRAPHCHAR} returns the key a user presses to leave a chart or to remove a message box. The character is stored at Location. This command lets you create a chart or message that functions as a menu of choices. The character returned can be used to branch or display any other data.

{GRAPHCHAR} works with {MESSAGE} to record what key the user pressed to remove a message box. It captures only characters the user can normally type into a cell; special characters such as Esc are not stored.

Examples

The following example displays a message box (its contents being the_msg) and returns the character the user pressed to remove it. The key pressed is stored in cells named the_key.

\A {MESSAGE the_msg,5,5,0}

{GRAPHCHAR the_key}

the_key

the_msg Press C to continue or any other key to quit...

The next example displays a chart and waits for the user to press a key. If the user presses P, B, or A, Corel Quattro Pro displays a (predefined) pie chart, bar chart, or area chart, respectively. The process repeats until the user presses any key but those three.

the_chart bar

the_key b

_graphic {GraphView}

_continue {GRAPHCHAR the_key}

{if @UPPER(the_key)="P"}{_draw “pie”}

{if @UPPER(the_key)="B"}{_draw “bar”}

{if @UPPER(the_key)="A"}{_draw “area”}

_draw {DEFINE the_chart}

{GraphView the_chart}

{BRANCH _continue}


{GraphCopy}

Syntax (Quattro Pro)

{GraphCopy FromChart, DestChart, <Style?(0|1)>, <Data?(0|1)>, <Annotations?(0|1)>}

Syntax (PerfectScript)

GraphCopy (FromGraph: String; DestGraph: String; [Style?: Enumeration {Yes!; No!}]; [Data?: Enumeration {Yes!; No!}]; [Annotations?: Enumeration {Yes!; No!}])

Parameters

FromChart

Chart containing the style, data, or annotation objects to copy.

DestChart

New chart (the copy).

Style?

Whether to copy properties that affect the appearance of the chart: yes (1), no (0).

Data?

Whether to copy chart data: yes (1), no (0).

Annotations?

Whether to copy annotation objects: yes (1), no (0).

{GraphCopy} copies the style, data, and/or annotation objects from one chart to another (within a notebook or between notebooks). It is equivalent to copying chart attributes using Edit | Copy and Edit | Paste Special.

You can use {GraphCopy?} or {GraphCopy!} to display the Paste Special Chart dialog box. {GraphCopy?} lets the user manipulate the dialog box, whereas {GraphCopy!} relies on the macro to manipulate it.


{GraphDeactivate}

{GraphDeactivate} deactivates a floating chart that has been activated for editing.

Examples

The following macro activates a floating chart for editing, creates a rectangle in the chart, makes a copy of the rectangle, then deactivates editing.

{GraphEdit Chart1, 1}

{CreateObject Rect,147,176,416,427}

{Duplicate 269,338}

{GraphDeactivate}


{GraphDelete}

Syntax (Quattro Pro)

{GraphDelete Name}

Syntax (PerfectScript)

GraphDelete (Name: String)

Parameters

Name

Name of the chart to delete.

{GraphDelete} deletes the specified chart from the active notebook.

You can use {GraphDelete?} or {GraphDelete!} to display the Delete Chart dialog box. {GraphDelete?} lets the user manipulate the dialog box, whereas {GraphDelete!} relies on the macro to manipulate it.


{GraphEdit}

Syntax (Quattro Pro)

{GraphEdit Name,<InPlace?(0|1)}

Syntax (PerfectScript)

GraphEdit (Name: String; [InPlace?: Enumeration {Yes!; No!}])

Parameters

Name

Name of the chart to edit.

InPlace?

Whether to edit the chart in place on a notebook sheet; 0 = no, 1 = yes; the default is 0.

{GraphEdit} displays the specified chart in a chart window for editing. Use the InPlace? argument to edit a floating chart on the notebook sheet.

You can use {GraphEdit?} or {GraphEdit!} to display the Edit Chart dialog box. {GraphEdit?} lets the user manipulate the dialog box, whereas {GraphEdit!} relies on the macro to manipulate it.

Examples

The following macro selects the floating chart named Inserted1 and then activates its source chart (Chart1) for editing on the notebook sheet.

{SelectFloat Inserted1}

{GraphEdit Chart1,1}


{GraphGallery}

Syntax (Quattro Pro)

{GraphGallery ChartStyle, ColorScheme}

Syntax (PerfectScript)

GraphGallery (GraphStyle: String; ColorScheme: String)

Parameters

ChartStyle

The style of chart; see {GraphSettings.Type} for a list of chart types.

ColorScheme

The color scheme used for the chart.

{GraphGallery} is the command equivalent for Chart | Gallery, which applies a chart style and color scheme to selected charts.

Available choices for ColorScheme are:

You can use {GraphGallery?} or {GraphGallery!} to display the Chart Gallery dialog box. {GraphGallery?} lets the user manipulate the dialog box, whereas {GraphGallery!} relies on the macro to manipulate it.

Examples

The following macro selects a 3-D Bar chart style and a “Tangerine” color scheme:

{GraphGallery “3dbar”,"Tangerine"}


{GraphNew}

Syntax (Quattro Pro)

{GraphNew Name,<UseCurrentBlock?(0|1)>}

Syntax (PerfectScript)

GraphNew (Name: String; [UseCurrentBlock?: Enumeration {Yes!; No!}])

Parameters

Name

Name of the new chart.

UseCurrentBlock?

Whether to chart the current selected cells; 0 = no, 1 = yes; the default is 0.

{GraphNew} creates a new chart and displays it in a chart window. If UseCurrentBlock? is 1, any selected data is shown in the chart; if it is 0, {GraphNew} creates a new chart without data.

You can use {GraphNew?} or {GraphNew!} to display the New Chart dialog box. {GraphNew?} lets the user manipulate the dialog box, whereas {GraphNew!} relies on the macro to manipulate it.


{GraphSettings.Titles}

Syntax (Quattro Pro)

{GraphSettings.Titles Main, Sub, X-Axis, Y-Axis, Y2-Axis}

Parameters

Main

Main title of the chart.

Sub

Title appearing below the main title of the chart.

X-Axis

Title of the chart’s x-axis.

Y-Axis

Title of the chart’s y-axis.

Y2-Axis

Title of the chart’s secondary y-axis.

{GraphSettings.Titles} is equivalent to Chart | Titles, which sets the titles of the active chart (or selected floating chart or chart icon). Each argument is a string; to reset a title, use an empty string (“”).

Example

The following macro command displays the chart Profit99 in a chart window and sets its main title and subtitles. The empty strings (“”) indicate that there are no axis titles.

{GraphEdit Profit99}

{GraphSettings.Titles “Projected Profits”,"1999","","",""}


{GraphSettings.Type}

Syntax (Quattro Pro)

{GraphSettings.Type Type, Class}

{GraphSettings.Type} is equivalent to Chart | Type/Layout, which lets you specify how the data in a chart is displayed. It affects the active chart (or chart icon or floating chart). Class specifies the class of chart type being used. Class can be one of six settings: Area/Line, Bar, Stacked Bar, Pie, Specialty, and Text.

Chart | Type/Layout...

Command equivalent

Area/Line | 3-D Area

{GraphSettings.Type “3D Area,Area/Line”}

Area/Line | 3-D Marker

{GraphSettings.Type “3D Marker,Area/Line”}

Area/Line | 3-D Ribbon

{GraphSettings.Type “3D Ribbon,Area/Line”}

Area/Line | 3-D Unstacked area

{GraphSettings.Type “3D Unstacked area,Area/Line”}

Area/Line | Area

{GraphSettings.Type “Area,Area/Line”}

Area/Line | Line

{GraphSettings.Type “Line,Area/Line”}

Area/Line | Rotated area

{GraphSettings.Type “Rotated area,Area/Line”}

Area/Line | Rotated line

{GraphSettings.Type “Rotated line,Area/Line”}

Bar | 2-D Half bar

{GraphSettings.Type “2DHalf bar,Bar”}

Bar | 3-D Bar

{GraphSettings.Type “3D Bar,Bar”}

Bar | 3-D Step

{GraphSettings.Type “3D Step,Bar”}

Bar | Area Bar

{GraphSettings.Type “Area_bar,Bar”}

Bar | Bar

{GraphSettings.Type “Bar,Bar”}

Bar | High Low Bar

{GraphSettings.Type “Hilo_bar,Bar”}

Bar | Line Bar

{GraphSettings.Type “Line_bar,Bar”}

Bar | Multiple bar

{GraphSettings.Type “Multiple bar,Bar”}

Bar | Rotated 2-D bar

{GraphSettings.Type “R2D bar,Bar”}

Bar | Rotated 2-D Half bar

{GraphSettings.Type “R2DHalf bar,Bar”}

Bar | Rotated 3-D bar

{GraphSettings.Type “R3D bar,Bar”}

Bar | Variance

{GraphSettings.Type “Variance,Bar”}

Pie | 3-D Column

{GraphSettings.Type “3D Column,Pie”}

Pie | 3-D Doughnut

{GraphSettings.Type “3D Doughnut,Pie”}

Pie | 3-D Pie

{GraphSettings.Type “3D Pie,Pie”}

Pie | Column

{GraphSettings.Type “Column,Pie”}

Pie | Doughnut

{GraphSettings.Type “Doughnut,Pie”}

Pie | Multiple 3-D columns

{GraphSettings.Type “Multiple 3D columns,Pie”}

Pie | Multiple 3-D pies

{GraphSettings.Type “Multiple 3D pies,Pie”}

Pie | Multiple columns

{GraphSettings.Type “Multiple columns,Pie”}

Pie | Multiple pies

{GraphSettings.Type “Multiple pies,Pie”}

Pie | Pie

{GraphSettings.Type “Pie,Pie”}

Specialty | 3-D Contour

{GraphSettings.Type “3D Contour,Specialty”}

Specialty | 3-D Shaded Surface

{GraphSettings.Type “3D ShadedSurface,Specialty”}

Specialty | 3-D Surface

{GraphSettings.Type “3D Surface,Specialty”}

Specialty | High Low

{GraphSettings.Type “HiLo,Specialty”}

Specialty | Polar radar

{GraphSettings.Type “Polar radar,Specialty”}

Specialty | XY

{GraphSettings.Type “XY,Specialty”}

Stacked Bar | 100% stacked bar

{GraphSettings.Type “100 stacked bar,Stacked Bar”}

Stacked Bar | 100% stacked line

{GraphSettings.Type “100 stacked line,Stacked Bar”}

Stacked Bar | 3-D 100% stacked bar

{GraphSettings.Type “3D100 stacked bar,Stacked Bar”}

Stacked Bar | 3-D Stacked bar

{GraphSettings.Type “3D Stacked bar,Stacked Bar”}

Stacked Bar | Rotated 2-D 100% stacked bar

{GraphSettings.Type “R2D100 stacked bar,Stacked Bar”}

Stacked Bar | Rotated 2-D 100% stacked line

{GraphSettings.Type “R2D100 stacked line,Stacked Bar”}

Stacked Bar | Rotated 2-D stacked bar

{GraphSettings.Type “R2D stacked bar,Stacked Bar”}

Stacked Bar | Rotated 2-D stacked line

{GraphSettings.Type “R2D stacked line,Stacked Bar”}

Stacked Bar | Rotated 3-D 100% stacked bar

{GraphSettings.Type “R3D100 stacked bar,Stacked Bar”}

Stacked Bar | Rotated 3-D stacked bar

{GraphSettings.Type “R3D stacked bar,Stacked Bar”}

Stacked Bar | Stacked bar

{GraphSettings.Type “Stacked bar,Stacked Bar”}

Stacked Bar | Stacked line

{GraphSettings.Type “Stacked line,Stacked Bar”}

Text | Blank

{GraphSettings.Type “Blank,Text”}

Text | Bullet

{GraphSettings.Type “Bullet,Text”}

Example

{GraphSettings.Type “3-D Pie,Pie”} make the active chart a 3-D pie chart.


{GraphView}

Syntax (Quattro Pro)

{GraphView <ChartName1,ChartName2,...>}

Syntax (PerfectScript)

GraphView (GraphName: String; {[MoreGraphName: String]})

Parameters

ChartName1

Name of the first chart to display (optional).

ChartName2

Name of the second chart to display (optional).

{GraphView} is equivalent to Chart | View Chart, which displays a chart (or series of charts) full-screen. {GraphView} without an argument displays the active chart (or chart icon or floating chart).

You can use {GraphView?} or {GraphView!} to display the View Chart dialog box. {GraphView?} lets the user manipulate the dialog box, whereas {GraphView!} relies on the macro to manipulate it.

Example

The following macro displays the named charts Profit90 through Profit94.

{GraphView Profit90,Profit91,Profit92,Profit93,Profit94}


{GraphWindow.Property}

Syntax (PerfectScript)

GraphWindow_Aspect_Ratio (Mode: string)

{GraphWindow.Property} is equivalent to right-clicking the title bar of a chart window to set its Aspect Ratio or Grid properties.

{GraphWindow.Aspect_Ratio Option} sets the aspect ratio of the active chart. Option can be one of the following settings: “35mm Slide”, “Floating Chart”, “Full Extent”, “Printer Preview”, or “Screen Slide”.

{GraphWindow.Grid GridSize,DisplayGrid,SnapToGrid} sets the grid size of the active chart window. Use GridSize to specify the percent of chart window between grid points; DisplayGrid specifies whether the grid is visible; SnapToGrid specifies whether the grid is active.

Example

This macro sets up a 10 by 10 grid, displays the grid, and enables it.

{GraphWindow.Grid “10,Yes,Yes”}


{Group.Option}

Command equivalent

Equivalent to

{Group.Define GroupName, StartPage, EndPage}

Insert | Name | Group of Sheets

{Group.Delete GroupName}

Insert | Name | Group of Sheets | Delete

{Group.ResetNames}

Clears all group names in the notebook; no equivalent command

{Group.Option} is the command equivalent for Insert | Name | Group of Sheets, which creates and deletes sheet groups.

Once you have defined a sheet group, you can use {Notebook.Group_Mode “On”} to activate Group mode. Use “Off” to cancel Group mode.

You can use {Group?} or {Group!} to display the Define/Modify Group dialog box. {Group?} lets the user manipulate the dialog box, whereas {Group!} relies on the macro to manipulate it.


{GroupObjects}

{GroupObjects} is the command equivalent for Format | Group. It groups selected objects in a chart window so they can be treated as one object in subsequent operations. Use {UngroupObjects} to treat them independently again.