Button.GetState

number Button.GetState ( 

string ObjectName )

Description

Returns the up/down state of a button object.

Note: This action is only effective on toggle buttons. You can change a button's type (standard or toggle) by changing the Style setting in the button's properties. Standard buttons will always return the "up" state.

Parameters

ObjectName

(string) The name of the button object.

Returns

(number) The current state of the button:

CONSTANT

VALUE

DESCRIPTION

BTN_UP

0

Button is up (normal).

BTN_DOWN

1

Button is down (pressed).

If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions