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.

 

Is Enabled

This option determines 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

This option 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

Use this option to determine if the control exists on any window currently open.

 

Does not Exist

This option determines if the control does not exist on any currently open window.

 

Is Visible

This option determines 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

This option determines if the control is not visible.

 

Is Focused

This option determines 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

This option determines if the control does not have focus.