{WAIT} pauses macro execution until the time corresponding to DateTimeNumber arrives. DateTimeNumber is a standard date/time serial number (both date and time portions must be included). If the current date is already later than the date specified in DateTimeNumber, macro execution continues immediately.
While execution is suspended, the macro is inactive, a WAIT indicator displays on the status line, and normal notebook operation can be restored only by pressing Ctrl+Break.
Example
The following macro beeps, displays a "Go home" message, and suspends all execution until 8:00 a.m. the next day:
{BEEP 3}
{PUTCELL "Time to go home!"}
{DOWN}
{WAIT @TODAY+1+@TIMEVALUE("8:00 AM")}
This macro waits for one day:
{WAIT @NOW+1}
This macro uses {WAIT} to alert you by sounding five short beeps, spaced two seconds apart:
\H {FOR counter,1,5,1,_loop_here}
_loop_here {BEEP 3}
{WAIT @NOW+@TIME(0,0,2)}
counter 6
Parameters
DateTimeNumber The date and time at which macro execution can resume
Note
This command is obsolete
{WaitCursorOn} and {WaitCursorOff}
Description
{WaitCursorOn} and {WaitCursorOff} turn on or off the default Windows "busy" cursor.
Note
This command is obsolete
{WebQuery.Create}
Syntax
{WebQuery.Create Filedata}
PerfectScript Syntax
WebQuery_Create (Filedata?: String)
Description
Lets you create a new Web query file.
Parameter
Filedata The name of the new query file
{WebQuery.Destination}
Syntax
{WebQuery.Destination DestRange}
PerfectScript Syntax
WebQuery_Destination (DestRange?: String)
Description
Lets you specify the output location. If empty, a new sheet will be used.
Parameter
DestRange The range of cells
{WebQuery.EditLink}
Syntax
{WebQuery.EditLink}
PerfectScript Syntax
WebQuery_EditLink ()
Description
Lets you edit the web link that is stored in the selected cell.
Example
WebQuery_InitLink
WebQuery_LinkRefreshType "0;1"
WebQuery_EditLink
Note
This command should be preceded by a set of property commands.
{WebQuery.InitLink}
Syntax
{WebQuery.InitLink}
PerfectScript Syntax
WebQuery_InitLink ()
Description
Lets you initialize the Web link.
Note
This is mandatory command that does the necessary initialization for editing the link.
{WebQuery.LinkRange}
Syntax
{WebQuery.LinkRange LinkRange}
PerfectScript Syntax
WebQuery_LinkRange (LinkRange?: String)
Description
Lets you specify the range of cells to be associated with Web link.
Parameter
LinkRange The range of cells
{WebQuery.LinkRefreshDuration}
Syntax
{WebQuery.LinkRefreshDuration Value}
PerfectScript Syntax
WebQuery_LinkRefreshDuration (Value?: String)
Description
Lets you specify the refresh duration in seconds
Parameter
Value Must be in the format "hh:mm:ss"
{WebQuery.LinkRefreshTime}
Syntax
{WebQuery.LinkRefreshTime Time}
PerfectScript Syntax
WebQuery_LinkRefreshTime (Time?: String)
Description
Lets you specify the value of start time, end time, start day, and end day.
Lets you specify the wrap options. LinkWrapOptions consists of two variables delimited by a semicolon.
Example
{WebQuery.LinkWrapOption 0; 1}
Parameters
LinkWrapOptions [semicolon delimited] Wrap Type
0 Wrap at the beginning of range
1 Insert data at the end of range
2 Insert data at the beginning of range
Boolean (Can be TRUE/FALSE only when WrapType is 0).
0 False
1 True
{WebQuery.QueryFileName}
Syntax
{WebQuery.QueryFileName FileName}
PerfectScript Syntax
WebQuery_QueryFileName (FileName?: String)
Description
Lets you specify the query file to be used.
Parameter
FileName The name of the query file.
{WebQuery.RefreshWebLink}
Syntax
{WebQuery.RefreshWebLink}
PerfectScript Syntax
WebQuery_RefreshWebLink ()
Description
Lets you refresh the current web link.
Note
There is a specification issue regarding the RefreshWebLink functionality. There is no way to run the link and download the data unconditionally. The user has to change the start time/date etc. or the system time to force the immediate update. It will be very useful to the user if there is any "Update link now" command.
{WebQuery.Run}
Syntax
{WebQuery.Run}
PerfectScript Syntax
WebQuery_Run ()
Description
Lets you run the current query.
{WebQuery.SetQueryOptions}
Syntax
{WebQuery.SetQueryOptions QueryOpts}
PerfectScript Syntax
WebQuery_SetQueryOptions (QueryOpts?: String)
Description
Lets you specify the values of the query options. QueryOpts consists of two variables delimited by a semicolon.
Lets you specify the range of cells to be updated from the query output.
Parameter
Range The range of cells
{WhatIf}
Syntax
{WhatIf.Option}
PerfectScript Syntax
WhatIf_Block (Block:String)
WhatIf_Input_Cell_1 (Cell:String)
WhatIf_Input_Cell_2 (Cell:String)
WhatIf_One_Way ()
WhatIf_Reset ()
WhatIf_Two_Way ()
Description
{WhatIf} builds one- or two-variable "what-if" tables that display a range of results for different conditions.
If you are creating a one-variable table, use these command equivalents: {WhatIf.Input_Cell_1}, {WhatIf.Block}, {WhatIf.One_Way}. For two-variable tables, use {WhatIf.Input_Cell_2} after indicating the first input cell; use {WhatIf.Two_Way} instead of {WhatIf.One_Way}.
You can use {WhatIf?} or {WhatIf!} to display the What-If dialog box. {WhatIf?} lets you manipulate the dialog box, whereas {WhatIf!} relies on the macro to manipulate it.
Example
The following macro defines A4..H18 as the "what-if" cells, B1 as Input Cell 1, B2 as Input Cell 2, and builds a two-variable table.
{Whatif.Block A:A4..A:H18}
{Whatif.Input_cell_1 A:B1}
{Whatif.Input_cell_2 A:B2}
{Whatif.Two_Way}
Options
{WhatIf.Block Block} Specifies the cells where you want to write the data table.
{WhatIf.Input_Cell_1 Cell} Specifies the first (or only) cell referenced by the what-if formula.
{WhatIf.Input_Cell_2 Cell} Specifies the second cell referenced by a two-variable what-if formula.
{WhatIf.One_Way} Builds the table.
{WhatIf.Reset} Clears all settings.
{WhatIf.Two_Way} Builds the table.
{WhatIfExpert}
Description
{WhatIfExpert} displays the first What-If Expert dialog box. The macro has no arguments
{WINDOW}
Syntax
{WINDOW<Number>}
Description
{WINDOW} switches to the specified open notebook window (1-9). This command is for compatibility with Quattro Pro for DOS; use {ACTIVATE} to activate windows when developing macros for Quattro Pro for Windows.
The argument Number is optional; {WINDOW} without an argument is equivalent to the Pane key, F6.
Parameters
Number Number of an open notebook window (1-9)
Note
This command is obsolete
{WindowArrIcon}
Description
{WindowArrIcon} lines up minimized windows on the Quattro Pro desktop or icons on the Objects sheet.
{WindowCascade}
Description
{WindowCascade} rearranges all open windows on the Quattro Pro desktop.
{WindowClose}
Description
{WindowClose} is equivalent to Close in a Control menu, which closes the active window (if the active window is not saved, a prompt appears to confirm the operation).
{WindowHide}
Description
{WindowHide} conceals the active notebook window.
{WindowMaximize}
Description
{WindowMaximize} is equivalent to Maximize in a Control menu, which enlarges the active window so it fills the screen.
{WindowMinimize}
Description
{WindowMinimize} is equivalent to Minimize in a Control menu, which shrinks the active window to an icon on the Quattro Pro desktop.
{WindowMove} is equivalent to Move in a Control menu, which lets you move the active window. UpperLeftX and UpperLeftY are the new coordinates of the upper-left corner of the window.
Parameters
UpperLeftX Distance between the left side of the Quattro Pro window and the left side of the active window, in pixels
UpperLeftY Distance between the bottom of the input line and the top of the active window, in pixels
{WindowNewView}
Description
{WindowNewView} displays a duplicate copy of the active notebook in a new window.
{WindowNext}
Description
{WindowNext} is equivalent to choosing Next in a Control menu or pressing Ctrl+F6. It makes the next window active.
{WindowPanes} splits a notebook window into two horizontal or vertical panes; use Clear to restore a single pane.
Width and Height indicate the ratio relationship between the panes.
You can use {WindowPanes?} or {WindowPanes!} to display the Split Window dialog box. {WindowPanes?} lets you manipulate the dialog box, whereas {WindowPanes!} relies on the macro to manipulate it.
Example
{WindowPanes Vertical,0,2,1} splits the notebook window into two vertical panes, not synchronized. The first pane is twice as wide as the second.
Parameters
Synch? Whether the panes are synchronized: yes (1) or no (0)
Width Width of the left pane or height of the upper pane (optional)
Height Width of the right pane or height of the lower pane (optional)
{WindowQPW}
Syntax
{WindowQPW.Option}
PerfectScript Syntax
WindowQPW_Maximize ()
WindowQPW_Minimize ()
WindowQPW_Restore ()
Description
{WindowQPW} is the command equivalent for the Maximize, Minimize, and Restore commands on the Quattro Pro Control menu.
¿ {WindowQPW.Maximize} enlarges the Quattro Pro window so it fills the screen.
¿ {WindowQPW.Minimize} shrinks the Quattro Pro window to an icon.
¿ {WindowQPW.Restore} restores the Quattro Pro window to its original size.
Options
{WindowQPW.Maximize} Maximizes the Quattro Pro application window.
{WindowQPW.Minimize} Minimizes the Quattro Pro application window.
{WindowQPW.Restore} Restores the Quattro Pro application window to its previous size.
{WindowRestore}
Description
{WindowRestore} is equivalent to Restore on the Control menu. It restores minimized windows to their original size.
{WindowShow}
Syntax
{WindowShow Name}
PerfectScript Syntax
WindowShow (Name:String)
Description
{WindowShow} shows hidden window Name and makes it active.
You can use {WindowShow?} or {WindowShow!} to display the Show Window dialog box. {WindowShow?} lets you manipulate the dialog box, whereas {WindowShow!} relies on the macro to manipulate it.
Parameters
Name Name of the hidden window to show
{WindowSize}
Syntax
{WindowSize X,Y}
PerfectScript Syntax
WindowSize (X:Numeric; Y:Numeric)
Description
{WindowSize} is equivalent to Size in the Control menu. It sizes the active window to the specified width and height.
Parameters
X New window width, in pixels
Y New window height, in pixels
{WINDOWSOFF}
Description
{WINDOWSOFF} disables normal screen updating during macro execution when Quattro Pro's Macro Suppress-Redraw property is set to None. It can significantly speed up execution for most macros because it saves Quattro Pro the time normally needed to redraw the screen each time a cell changes. Quattro Pro cancels it once the macro stops executing, so you are not "locked out" of the screen. To cancel its effect within the same macro, use {WINDOWSON}.
Use {WINDOWSOFF} with {PANELOFF} to completely disable normal screen updating.
After a {WINDOWSOFF} command, avoid pointing to cells in response to an Edit command. The selector may be in a different cell than the "frozen" display indicates. If you must point to cells, precede it with a {WINDOWSON} command.
Example
The following macro uses {WINDOWSOFF} and {WINDOWSON} to turn off screen updating while Quattro Pro sorts a list of vendors with the cell name vendor_name, thereby speeding up the sort operation.
sort_blk vendor_name
key_nm vendor_name
\W {QGOTO}sort_message~
{WINDOWSOFF}
{_sort vendor_name}
{WINDOWSON}
_sort {DEFINE sort_blk}
{Sort.Block @@(sort_blk)}
{BlockCopy sort_blk,key_nm}
{Sort.Key_1 @@(key_nm)}
{Sort.Order_1 "Ascending"}
{Sort.Go}
sort_message SORT IS IN PROGRESS
vendor_name General Cement Co.
Alveoli Mfg., Inc.
Sandab Development
Consolidated Dust
{WINDOWSON}
Description
{WINDOWSON} reenables normal screen updating during macro execution, canceling the effects of a previous {WINDOWSOFF}. However, the screen will not be updated until {CALC} is encountered or the macro ends. If {WINDOWSON} is called when screen updating is already in effect, the command is ignored.
See {WINDOWSOFF}for an example using {WINDOWSON}.
{WindowTile}
Description
{WindowTile} displays all open windows without overlapping them.
{WindowTitles} locks specific rows and/or columns of a spreadsheet sheet as titles on screen. When you scroll, the titles remain fixed on screen while the rows below (or columns to the right) scroll as usual. "Horizontal" locks rows above the active cell, "Vertical" locks columns to the left of the active cell, and "Both" locks both rows and columns. Use "Clear" to unlock the titles.
You can use {WindowTitles?} or {WindowTitles!} to display the Locked Titles dialog box. {WindowTitles?} lets you manipulate the dialog box, whereas {WindowTitles!} relies on the macro to manipulate it.
You can use {WindowTitles.Title} with @COMMAND, @PROPERTY, and @CURVALUE.
Example
Use @COMMAND{"WindowTitles.Title"} to determine whether locked titles are in use and to display their type (Horizontal, Vertical, Both, or Clear). You can also use this command in macros to check for locked titles.
Filename The name of the document you want to route
{Workflow.WorkflowManager}
Syntax
{Workflow.WorkflowManager}
PerfectScript Syntax
Workflow_WorkflowManager ()
{WorkSpace}
Syntax
{WorkSpace.Option}
PerfectScript Syntax
Workspace_Restore (Filename:String)
Workspace_Save (Filename:String)
Description
{Workspace.Save} saves all open notebooks as a group with the specified Filename (Quattro Pro's default file extension for workspaces is .WBS). {Workspace.Restore} opens the specified file.
Options
{Workspace.Restore Filename} Overlays any existing windows with the windows stored in the workspace file, then retrieves the appropriate file for each.
{Workspace.Save Filename} Saves the position and size of all notebook windows and the names of the files contained in each window.
{WRITE}
Syntax
{WRITE String<,String2,String3,...>}
Description
{WRITE} copies String to a file opened with the {OPEN} command, starting at the location of the file pointer. The file pointer is advanced to the position following the last character written, and the file's size increases if necessary. See {GETPOS} for a discussion of the file pointer.
{WRITE} does not place the carriage return and linefeed characters at the ends of lines. To include these characters, use {WRITELN}.
String can be a quoted string or text formula. If using more than one String, separate them with commas. For example, to write the label Dear Ms. followed by the contents of B6 into the file, use the following:
{WRITE "Dear Ms. ",+B6}
You can use an unlimited number of String arguments with {WRITE}.
If no file is open, or if there is insufficient room on the disk to increase the file's size, {WRITE} fails. Macro execution then continues with the first command after {WRITE} (in the same cell). If {WRITE} is successful, the rest of that cell's commands are ignored, and execution continues on the next row below.
If you try to reference a cell that does not contain a label, an error message displays.
Example
The following example creates a text file with fixed-length fields that will serve as a phone list database. After the macro runs, the file will look like this:
Golden, David 415-555-7774;Hack, Edmund 201-555-3511;Hall, Sue Ann 617-555-5678
See the description of {READ} to see how to read a file like this.
\K {OPEN "A:PHONEDIR.PRN",W}
{WRITE "Golden, David "}
{WRITE "415-555-7774;"}
{WRITE "Hack, Edmund "}
{WRITE "201-555-3511;"}
{WRITE "Hall, Sue Ann "}
{WRITE "617-555-5678"}
{CLOSE}
Parameters
String String of characters to be written into the open file
Note
¿ After you finish accessing a file with {WRITE}, it must be closed with {CLOSE}. Otherwise, the file could become corrupted if the computer is turned off or otherwise interrupted.
This command is obsolete
{WRITELN}
Syntax
{WRITELN String<,String2,String3,...>}
Description
{WRITELN} 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. The file pointer advances to the position following the last character written, and the file's size increases if necessary. (See {GETPOS} for a discussion of the file pointer.)
To enter a blank line in the file, use {WRITELN ""}. To enter characters without carriage-return/linefeed characters, use {WRITE}.
String can be a quoted string or a text formula. If using more than one String, separate them with commas. For example, to write the label Dear Ms. followed by the contents of B6 into the file, you would use
{WRITELN "Dear Ms. ",+B6}
A carriage return and linefeed character are placed at the end of all strings combined, not after each. You can use an unlimited number of String arguments with {WRITELN}.
If no file is open, or if there is insufficient room on the disk to increase a file's size, {WRITELN} fails. Macro execution then continues with the first command after {WRITELN} in the same cell. If {WRITELN} succeeds, the rest of that cell's commands are ignored, and execution continues on the next row below.
Example
The following example shows how {WRITELN} is used to write a line of text to the file TEST.TXT. This line is terminated by the CR (carriage-return) and LF (linefeed) characters.
\Z {OPEN "A:TEST.TXT",W}
{WRITELN "This is a short line."}
{CLOSE}
Parameters
String String of characters to be written into the open file as a single line
Notes
¿ After you finish accessing a file with {WRITELN}, you must close the file with {CLOSE}. Otherwise, the file could become corrupted if the computer is turned off or otherwise interrupted.