xButton.GetState

number xButton.GetState (

string ObjectName )

Description

Returns the up/down state of an xButton object.

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

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(number) The current state of the xButton:

CONSTANT

VALUE

DESCRIPTION

BTN_UP

0

xButton is up (normal).

BTN_DOWN

1

xButton 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