The absolute value is the distance a value is from zero, and is always positive. If the value is negative, the absolute value is the positive equivalent of the same value. The absolute value of a positive value is the same value.
Return Value
Absolute value of a value.
Parameter
Value: numeric Get the absolute value of this value.
This command accepts the four standard parts of a loan. If three of the four are specified, this command will compute and return the fourth value (which is left blank).
Return Value
The value of the missing item is returned. If more than one of the parameters is missing, a value of 0.0 is returned.
Parameter
Principle: numeric The amount of the loan principle. This is the borrowed amount.
InterestRate:
numeric The interest rate that will be charged. This is the interest rate per period. If the loan is payed once per month, this is the monthy interest rate.
Duration:
numeric The duration of the loan in periods. If the loan is payed in months, this returns the number of months of the loan.
Payment: numeric This is the payment per period. If the loan is payed in months, this is the monthly payment.
numeric := acos
Syntax
(Value: numeric)
Description
Get an angle in radians for a specified cosine. This is called the arc, or inverse cosine.
Return Value
Angle in radians.
Parameters
Value: numeric Cosine.
numeric := acosh
Syntax
(Value: numeric)
Description
Get an angle in radians whose hyperbolic cosine is specified. This is called the arc, or inverse hyperbolic cosine.
Return Value
Angle in radians.
Parameters
Value: numeric Hyperbolic cosine.
variable := Address
Syntax
(<VariableName> variable)
Description
Pass a variable address (DLL call in-line parameter and OLE type casting function). See DLLCall and OLE Automation.
Parameters
<VariableName> variable
boolean := boolean AND boolean
Description
Operator. Precedence level 8. Combine two relationship expressions.
Return Value
True if both expressions are true, False if not.
Animate
Syntax
(Type: enumeration; Specification: string)
Description
Lets you specify mouse actions or keystrokes to execute without user intervention. You can use the Animate command to demonstrate how to perform a function.
Parameters
Type: enumeration Lets you specify whether or not the Animate command animates the mouse pointer or activates a key on the keyboard.
Mouse! Activate the mouse pointer.
Keyboard! Activate a key on the keyboard.
Specification: string Lets you specify actions to animate. Specification contains a keystring or a mouse string depending on the value of Type.
string := AnsiString
Syntax
(<Value> string)
Description
Pass a variable address (DLL call in-line parameter and OLE type casting function). See DLLCall and OLE Automation.
Parameter
<Value> string
numeric := AppActivate
Example
Syntax
(Window: numeric or string; [State: enumeration])
Description
Activate and display a window, using the window title or the window handle. AppActivate returns the window handle, or use AppLocate to get the window handle.
Example
hWnd = AppLocate("Calculator")
If(hWnd) // if hWnd not equal to 0
AppActivate(Window:hWnd)
Else
Quit
EndIf
Return Value
Window handle.
Parameters
Window: numeric or string A window handle or title. Titles must match a window title exactly unless you use an asterisk as a wildcard character. Titles are case sensitive. Use AppLocate to get the window handle.
State: enumeration (optional) Set the Window to this state. If missing, no new state is set, and, if minimized, the window is restored. See AppExecute for a description of possible enumerations.
boolean := AppClose
Example
Syntax
(Window: numeric or string)
Description
Close an application by its title or window handle.
Return Value
True if successful, False if not.
Parameters
Window: numeric or string A title or window handle. Titles must match window titles exactly unless you use an asterisk as a wildcard character. Titles are case sensitive. Use AppLocate to get the window handle.
enumeration := AppExecute
Example
Syntax
(CommandLine: filename; [State: enumeration])
Description
Start an application and specify how its window is displayed. This command now accepts application command lines containing spaces in the program filename.
Return Value
Application handle (unique number) if the application is successfully started, The return value is now an enumeration. If treated as a numeric value, all return values less than 33 are considered errors. Success! has been defined with a value of 33, so any value less than Success! is an error. The following enumerations have been defined for the most common return values. As a matter of clarification, if the return value is >=33, the function was successful.
Success! this is the lowest of all successful return values.
AccessDenied! The operating system denied access to the file.
BadFileFormat! The .exe file is invalid.
DDEBusy! The DDE transaction could not be completed because other DDE transactions were being processed.
DDETFailed! DDE transaction failed.
DDETimeout! DDE transaction could not be completed because the request timed out
FileNotFound!
InvalidFileAssocation! File name association is incomplete or invalid.
NoFileAssociation! There is no application associated with the given file name extension.
OutOfMemory!
OutOfResources!
PathNotFound!
SharingError!
Check error values with code similar to the following:
vError := AppExecute (String; Enumeration)
Switch(vError)
CaseOF 0: ...statement block...
CaseOF 2: ...statement block...
EndSwitch
Parameters
CommandLine: filename Path and filename of an application. If parameters are also being passed to the application in the command line inserter, then the filename of the application must be enclosed in double quote marks so that the beginning and end of the filename can be determined. If no parameters are being passed, no quote marks are required.
State: enumeration (optional) Specifies how an application's window is displayed. If missing, CurrentState! is used.
Hide! Hide the window. AppLocate and DDEInitiate return the window handle of a hidden window. DDEExecute sends a command string to a hidden window. AppActivate activates a hidden window. Accelerator keys choose a hidden window's menu options.
Normal! Show the window at normal size.
Maximize! Maximize the window to full screen size and activate it.
Minimize! Minimize the window to an icon and activate it.
MinimizeNoActivate! Minimize the window to an icon. The active window remains active.
MinimizeActivateTopLevel! Minimize the window and activate the next window.
CurrentState! Activate and show the window in its current size and position.
CurrentStateNoActivate! Display the window in its current state. The active window remains active.
RecentStateNoActivate! Display the window in its most recent size and position. The active window remains active.
Restore! Activate and display the window, restoring the original size.
Default! The default state specified by the application.
Identify, for the compiler, an application to use in a macro.
Application is a non-executable statement that can occur anywhere in a macro, but it must precede product commands to the application it identifies.
Applications used in the macro automatically start unless they are already active. The user cannot terminate an application used in a macro until the macro ends.
Parameters
<ProductPrefix> identifier A word identifier that begins with a letter. Characters after the first can be letters or numbers. ProductPrefix directs product commands to non-default applications. It is also used in NewDefault and EndApp statements. Use a period to attach ProductPrefix to a product command. If WordPerfect is the application and WP is the product prefix, WP.AboutDlg is a valid command statement. A recorded macro specifies the product name as the product prefix.
<ApplicationName> string The name of an application. For example: "WordPerfect" for WordPerfect, "QuattroPro" for Quattro Pro, and "Presentations" for Corel Presentations
<Default> enumeration (optional) An enumeration that identifies the default application. If not specified, ApplicationName is not the default.
Product commands to the default application do not require a product prefix. Default! Specifies ApplicationName as the default.
<Language> string (optional) The application's language code. For example, "EN" is the language code for all English forms. If not specified, the command uses the language of the current macro system.
numeric := AppLocate
Example
Syntax
(WindowTitle: string)
Description
Return a window handle.
AppLocate compares a name to the title bar text of all open windows. If a match is found, the window handle of the matching window is returned. If the search criteria matches more than one window, the window handle of the most recently opened window is returned. If no match is found, zero is returned.
You can use an asterisk (*) as a wildcard character at any position in the AppLocate parameter. If the parameter contains only an asterisk, AppLocate returns the window handle of the window in the foreground.
Return Value
The window handle of the window found in the search, or 0 if no window is found.
Parameters
WindowTitle: string A window title. This parameter must match the window title exactly unless you use an asterisk as a wildcard character. Titles are case sensitive.
numeric := AppShow
Example
Syntax
(Window: numeric or string; [State: enumeration])
Description
Specify an application's display state. Identify the application by title or window handle.
Return Value
Window handle.
Parameters
Window: numeric or string A title or window handle. Titles must match window titles exactly unless you use an asterisk as a wildcard character. Titles are case sensitive. Use AppLocate to get the window handle.
State: enumeration (optional) Display states. If missing, CurrentState! is used.
Hide! Hide the window. AppLocate and DDEInitiate return the window handle of a hidden window. DDEExecute sends a command string to a hidden window. AppActivate activates a hidden window. Accelerator keys choose a hidden window's menu options.
Normal! Show the window at normal size.
Maximize! Maximize the window to full screen size and activate it.
Minimize! Minimize the window to an icon and activate it.
MinimizeNoActivate! Minimize the window to an icon. The active window remains active.
MinimizeActivateTopLevel! Minimize the window and activate the next window.
CurrentState! Activate and show the window in its current size and position.
CurrentStateNoActivate! Display the window in its current state. The active window remains active.
RecentStateNoActivate! Display the window in its most recent size and position. The active window remains active.
Restore! Activate and display the window, restoring the original size.
Default! The default state specified by the application.
any := array
Syntax
[{<index> numeric}]
Description
Operator.
Return Value
Return the specified element of an array.
numeric := array
Syntax
[0]
Description
Operator. Specify zero as the index regardless of the number of dimensions.
The same value is returned by the command vElements := Dimensions (array[ ]; 0). See Dimensions.
Example
Declare Array[3; 5; 6]
vElements := Array[0]
Result: vElements = 90
Return Value
The number of elements in an array variable.
numeric := asin
Syntax
(Value: numeric)
Description
Get an angle in radians for a specified sine. This is called the arc, or inverse sine.
Return Value
Angle in radians.
Parameters
Value: numeric Sine.
numeric := asinh
Syntax
(Value: numeric)
Description
Get an angle in radians for a specified hyperbolic sine. This is called the arc, or inverse hyperbolic sine.
Return Value
Angle in radians.
Parameters
Value: numeric Hyperbolic sine.
Assert
Example
Syntax
(Condition: enumeration or numeric)
Description
Create a Cancel, Error, or Not Found condition, or user-defined condition. See OnCondition.
A Cancel, Error, Not Found, or user condition stops a macro unless preceded by OnCancel, OnError, OnNotFound, or OnCondition, which direct macro execution to a specified Label. Assert has no effect when preceded by Cancel(Off!), Error(Off!), NotFound(Off!), or OnCondition(<Condition>; Off!).
An error value is assigned to variable ErrorNumber when one of the conditions occur. The values are:
ErrorNumber.CancelConditionAsserted!
ErrorNumber.ErrorConditionAsserted!
ErrorNumber.NotFoundConditionAsserted!
ErrorNumber.UserDefinedCondition!
You cannot assign a value to ErrorNumber.
Use code similar to the following to check all conditions with one subroutine.
Condition: enumeration or numeric A condition to assert.
CancelCondition! Stop a macro unless preceded by OnCancel.
ErrorCondition! Stop a macro unless preceded by OnError.
ExitCondition! Stop a macro as if a Quit command was encountered.
NotFoundCondition! Stop a macro unless preceded by OnNotFound.
UserDefinedCondition! Stop a macro on a user-defined condition, unless preceded by OnCondition. For example, if you define condition 101, Assert(101) or Assert(UserDefinedCondition! + 1) directs macro execution to the Label identified by OnCondition.
VarErrChkCondition! Stop a macro unless preceded by OnVarErrChk.
See OnCondition for a description of how to specify a user-defined condition number.
numeric := atan
Syntax
(Value: numeric)
Description
Get the angle in radians for a specified tangent. This is called the arc, or inverse tangent.
Return Value
Angle in radians.
Parameters
Value: numeric Tangent.
numeric := atan2
Syntax
(Value: numeric; Value2: numeric)
Description
Get the angle in radians for a specified tangent that is Value / Value2. This is called the arc, or inverse tangent.
Return Value
Angle in radians.
Parameters
Value: numeric Numerator of a tangent.
Value2: numeric Denominator of a tangent.
numeric := atanh
Syntax
(Value: numeric)
Description
Get an angle in radians for a specified hyperbolic tangent. This is called the arc, or inverse hyperbolic tangent.
Return Value
Angle in radians.
Parameters
Value: numeric Hyperbolic tangent.
numeric := Average
Syntax
({Value: numeric})
Description
Get the average of a list of values.
Example
vAvg := Average (2; 4; 6; 8)
Result: vAvg = 5.0
Return Value
Average of a list of values.
Parameters
Value: numeric Use a semicolon to separate values.