Predefined Functions

Constants and system variables

There are few constants:

TRUE
– has value of 1

FALSE - has value of 0

ScreenWidth - returns width of the display screen

ScreenHeight - returns height of the display screen

MXROW, MXCOL - for matrix object, returns the position of clicked matrix object - see Matrix

MCIResult - returns result from MCICommand function. See more in Basic Functions
CBK_Time - as the CBK_Time object, but this variable returns the Time in seconds (integer)
CBK_Total - as the CBK_Total object, but this variable returns the Total Time in seconds (integer)

OpenFile$ - after using a command OpenFile from the script, this string variable will have the path of the opened file

Random Function

RND
(Maximum)

Will return random integer number in the range 0 …maximum

Example:

A = RND(50)+1

Integer function

Always makes an integer value from the expression.

a = INT(x/100)

if (a=0) then

...

end

ABS function

Returns Absolute value of expression

a = ABS(x-100)

Mouse Functions

MOUSEX( )
MOUSEY( )

returns x and y position of the mouse cursor

x = MOUSEX()

Object Functions

OBJECTX( Object label)
OBJECTY( Object label)
These functions return the current position (left, top corner) of the object specified by the label.
x = OBJECTX(Text1)

ISVISIBLE( Object label)
This returns
-1 if object doesn't exist on the page,
0 if object is hiden
1 if object is visible

if (visible = 0) then

Show("Text1")

end