If Control

 

The If Control command is used to determine the status of a Window Control saved to a variable.

 

 

Script Editor > Expand Logic Category > If Control

 

 

Control Variable

Insert the name of the Control Variable in this field.

 

 

Option

There are eight options available for use. Select one from the drop down list.

 

 

Option

Description

Is Enabled

Verifies if the window with the control is the active window. In addition it checks to see if the control is enabled, or in other words, if the control is not grayed out.

Is Disabled

Determines if the window with the control is not the active window. In addition it checks to see if the control is disabled, if the control is grayed out.

Exists

Looks to see if the control exists on any window currently open.

Does not Exist

Checks to see if the control does not exist on any currently open window.

Is Visible

Verifies if the control is visible. The control does not need to have focus, it just needs to be visible. This control may be a Window Title, a button, a toolbar, an edit box or some other part of the window. A control on a window that is hidden or minimized may still be visible to this command.

Is not Visible

Determines if the control is not visible.

Is Focused

Checks to see if the control has focus.

 

üNote: Not all controls are written so that they can receive focus. If this is the case for the control being used, then the Visible or Enabled options would be a better choice. Otherwise the If Focused option will always come back false and the If Not Focused option will always test as true.

Is not Focused

Looks to see if the control does not have focus.