ControlPick

Selects a specified control in an active secondary window. Command buttons, option buttons, check boxes, group boxes, list boxes, and text fields are examples of controls. Generally, toolbar buttons, property sheet tabs, and taskbar buttons cannot be selected by using ControlPick.

Syntax

ControlPick "menuItem"

Argument Description
menuItem Specifies the identifier assigned to the control to be selected. This value is typically the control's text label, and is case sensitive. Do not use a control's accelerator keys for this value. If the label includes an ampersand (&) prefixing an access key, do not include it.

Example

This example presses the OK button in the active window.

ControlPick "OK"

Notes

  • ControlPick does not work for non-standard controls, such as an option with a bitmapped text label. You may be able to select a non-standard control by using SendKeys to send a TAB sequence.
  • A static text field, such as a text box label, can be selected only if it has an access key (underlined letter).