{LEFT} and {L} are equivalent to the Left-arrow key. The optional argument Number moves the selector the corresponding number of columns to the left. You can use cell references or cell names as arguments.
Example
{L}{L}{L} moves the selector left three columns.
{LEFT 6} moves the selector six columns to the left.
{LEFT D9} moves to the left the number of columns specified in cell D9.
{LEFT count} moves to the left the number of columns specified in the first cell of the cells named count.
Parameters
Number Any positive integer (optional)
{LET}
Syntax
{LET Location,Value<:Type>}
PerfectScript Syntax
Let (Cell:String; Value:Any)
Description
With {LET}, you can enter a value into Location without moving to it. {LET} enters the value or string you specify with Value in Location.
You can use the optional Type argument to specify whether to store Value as an actual number or as a string. If you specify a formula as a string, the formula is written into Location as a string, not the resulting value. For example, {LET A1,B3*23:string} stores the formula B3*23 as a label in cell A1. If you omit Type, Quattro Pro tries to store the value as a numeric value; if unsuccessful, it stores the value as a string.
Location must be a cell address or cell name; you can use functions such as @CELLPOINTER as a Location in {LET} commands only if they return a cell address or cell name.
Value cannot be an @ARRAY formula. {LET} does not not enter array values. Use {PUTCELL} or {PUTCELL2} to enter array values.
You can use {LET} to invoke add-in @functions or macros contained in DLLs. Specify the add-in as Value, using this syntax for functions:
For example, this statement calls the @function MEDIAN, included in DLL Stats, with a five-item list as an argument and stores the result in Location G6:
{LET(@CELLPOINTER("address")),99} makes the value of the active cell 99.
The examples below assume A1 contains the label 'Dear, A2 contains the label 'Sir, and A3 contains the value 25. The result is shown to the right of each {LET}.
\M {LET F1,25} 25
{LET F2,A3} 25
{LET F3,+A1&""&A2} Dear Sir
{LET F4,+A1&""&A2:value} Dear Sir
{LET F5,+A1&""&A2:string} +A1&""&A2
{LET F6,+A1&A3} ERR (because A3 is a value)
Parameters
Location Cell in which to store the specified value
Value Numeric or string value to be stored in Location
Type String or value; string (or s) stores the value or formula as a label, and value (or v) stores the actual value or value resulting from a formula (optional)
{Link}
Syntax
{Link "string"}
Description
{Link} applies a link to the currently selected object, such as a pushbutton in a dialog or toolbar.
Example
{Link "ON Clicked DOMACRO {filesave}"}
{Links}
Syntax
{Links.Option}
PerfectScript Syntax
Links_Change (OldName:String; NewName:String)
Links_Delete (LinkName:String)
Links_Open (LinkName:String)
Links_Refresh (LinkName:String)
Description
{Links.Option} refreshes, changes, or deletes links in the active notebook.
LinkName is the name of the file being linked to. You can set LinkName to * to affect all links in the active notebook. If LinkName is omitted, the dialog box that normally performs the operation appears (and is under macro control; use {PAUSEMACRO} to pass control to the user).
Example
{Links.Refresh *} refreshes all links in the active notebook.
The following macro displays the Open Links dialog box and lets you select the name of a linked notebook to open.
{Links.Open}
{PAUSEMACRO}
Options
{Links.Change OldName, NewName} Switches links from one file to another
{Links.Delete LinkName|*} (* = all links) Deletes notebook links
{Links.Open LinkName|*} (* = all links) Opens files linked to the active notebook
{Links.Refresh LinkName|*} (* = all links) Refreshes links to unopened files
{LOOK}
Syntax
{LOOK Location}
Description
When Quattro Pro runs a macro, it does not respond to keystrokes you enter (except Ctrl+Break). If you press keys during macro execution, those keystrokes are stored in the computer's type-ahead buffer and are responded to when the macro pauses for input, or ends.
{LOOK} checks this type-ahead buffer for stored keystrokes. If any are found, it places the first keystroke the user typed in Location as a macro command.
{LOOK} can be used while processing long macros to check for a keystroke that might signal the user wants to quit (see the next example).
{LOOK} does not remove the keystroke from the buffer. If a macro does nothing other than {LOOK}, the key still passes to Quattro Pro when the macro ends. To remove pending keystrokes from the buffer, use {GET}.
Example
In the following example, the macro gives you 15 seconds to choose the next menu choice. If you do not, you must reenter the password. Important: Type the line to the right of _check_it with no hard returns until after {BRANCH _password}, then press Enter to insert it into one cell (the macro commands from {LOOK keystroke} to {BRANCH -password} are shown here on separate lines for readability).
\M {QGOTO}msg_area~
A. Add name{DOWN}
B. Edit name{DOWN}
C. Delete name{DOWN}
Enter choice: {RIGHT}
{ }
{LET start_time,@NOW}
_check_it {LOOK keystroke}
{IF keystroke=""}
{IF @NOW>start_time + @TIME(0,0,15)}
{BRANCH _password}
{IF keystroke<>""}{BRANCH _take_action}
{BEEP 4}
{BRANCH _check_it}
_password {; get password from user}
{GETLABEL "Enter password : ",pass}
_take_action { }
{BEEP 3}
start_time
keystroke
pass
msg_area
Parameters
Location A cell in which to store a typed character