The wnd object represents a generic window and is used as a base object for all other controls. It also contains methods for attaching an application and navigating its child windows hierarchy. You would typically create an instance of such an object using the ProgID "Wrappers.WNDWrapper" and then use its methods to obtain access to various UI elements in your application.
Also, the wnd object implements the IAccessible interface. If Accessibility is installed then every Q1 object will directly support accessibility properties and methods. See Accessibility for more details.
Because all other Windows control wrappers inherit from wnd you can use constructs like dialog.combobox.listbox to access child windows.
// Create the object used to access the application
var app = new ActiveXObject("Wrappers.WNDWrapper");
app.appExecute("SampleWinCtrls.exe");
// Select the tab named "Second"
app.tabctrl.curSel = "Second";
| appAttach | Searches for a top level window with the specified title and attaches to it. |
|---|---|
| appExecute | Executes the specified command line and attaches to the main window of the application. |
| appRelease | Detaches from the current application with an option of terminating it. |
| click | Synthesizes a mouse click in the center of the window. |
| connect | Attaches to the window identified by the HWND parameter. |
| dblclick | Synthesizes a mouse double click in the center of the window. |
| waitForWindow | Searches for the specified window, retrying until found or until timeout elapses. |
| accObj | Returns an accessibility object wrapper for the specified window, if Accessibility is installed. |
|---|---|
| button | Returns a child button control object. The button can be either push-button, radio-button or checkbox. |
| combobox | Returns a child combobox control object. |
| dialog | Returns a child dialog object. |
| dlgItem | Returns a child control specified by its control ID. |
| edit | Returns a child edit control object. |
| label | Returns a child label (static control) object. |
| listbox | Returns a child listbox control object. |
| listview | Returns a child list control object. |
| menu | Returns a wrapper for the standards Windows menu. |
| mshtml | Returns a child HTML control object. The returned object can then be used to access the object model within the HTML document. |
| tabctrl | Returns a child tab control object. |
| toolbar | Returns a child toolbar control object. |
| treectrl | Returns a child tree control object. |
| value | Gets/sets the text of the window. |
| wnd | Returns a generic child window object. |
The following properties are provided to help navigating through child accessible objects.
| Accessibility Role Helpers | |
|---|---|
| accAlert | Returns a child Alert object. |
| accAnimation | Returns a child Animation object. |
| accApplication | Returns a child Application object. |
| accBorder | Returns a child Border object. |
| accButtonDropDown | Returns a child ButtonDropDown object. |
| accButtonDropDownGrid | Returns a child ButtonDropDownGrid object. |
| accButtonMenu | Returns a child ButtonMenu object. |
| accCaret | Returns a child Caret object. |
| accCell | Returns a child Cell object. |
| accCharacter | Returns a child Character object. |
| accChart | Returns a child Chart object. |
| accCheckButton | Returns a child CheckButton object. |
| accClient | Returns a child Client object. |
| accClock | Returns a child Clock object. |
| accColHeader | Returns a child ColHeader object. |
| accComboBox | Returns a child ComboBox object. |
| accColumn | Returns a child Column object. |
| accCursor | Returns a child Cursor object. |
| accDiagram | Returns a child Diagram object. |
| accDial | Returns a child Dial object. |
| accDialog | Returns a child Dialog object. |
| accDocument | Returns a child Document object. |
| accDropList | Returns a child DropList object. |
| accEquation | Returns a child Equation object. |
| accGraphic | Returns a child Graphic object. |
| accGrip | Returns a child Grip object. |
| accGrouping | Returns a child Grouping object. |
| accHelpBalloon | Returns a child HelpBalloon object. |
| accHotkeyField | Returns a child HotkeyField object. |
| accIndicator | Returns a child Indicator object. |
| accLink | Returns a child Link object. |
| accList | Returns a child List object. |
| accListItem | Returns a child ListItem object. |
| accOutline | Returns a child Outline object. |
| accOutlineItem | Returns a child OutlineItem object. |
| accPageTab | Returns a child PageTab object. |
| accPageTabList | Returns a child PageTabList object. |
| accPane | Returns a child Pane object. |
| accProgressBar | Returns a child ProgressBar object. |
| accPropPage | Returns a child PropPage object. |
| accPushButton | Returns a child PushButton object. |
| accRadioButton | Returns a child RadioButton object. |
| accRow | Returns a child Row object. |
| accRowHeader | Returns a child RowHeader object. |
| accMenuBar | Returns a child MenuBar object. |
| accMenuItem | Returns a child MenuItem object. |
| accMenuPopup | Returns a child MenuPopup object. |
| accScrollBar | Returns a child ScrollBar object. |
| accStaticText | Returns a child StaticText object. |
| accSlider | Returns a child Slider object. |
| accSound | Returns a child Sound object. |
| accSpinButton | Returns a child SpinButton object. |
| accSeparator | Returns a child Separator object. |
| accStatusBar | Returns a child StatusBar object. |
| accTable | Returns a child Table object. |
| accText | Returns a child Text object. |
| accTitleBar | Returns a child TitleBar object. |
| accToolbar | Returns a child Toolbar object. |
| accTooltip | Returns a child Tooltip object. |
| accTree | Returns a child Tree object. |
| accTreeItem | Returns a child TreeItem object. |
| accWhitespace | Returns a child Whitespace object. |
| accWindow | Returns a child Window object. |
The following properties are flags which describe the state of an accessible object
| Accessibility State Helpers | |
|---|---|
| accIsUnavailable | Indicates that the object is not available. |
| accIsSelected | Indicates that the object is selected. |
| accIsFocused | True if the object has keyboard focus. |
| accIsPressed | The object (for example a push button) is pressed. |
| accIsChecked | True if this object is checked. |
| accIsMixed | This object is in an undetermined third-state: neither checked not unchecked. |
| accIsReadOnly | Object is readonly. |
| accIsHotTracked | True if the object is in a hot-track state, caused by the mouse hovering over it. Only applies to objects which support hot-tracking. |
| accIsDefault | This object is the default button in a dialog. |
| accIsExpanded | Applies to outline items (tree items) and is true if the item is expanded and its children are visible. |
| accIsCollapsed | Applies to outline items (tree items) and is true if the item is collapsed and its children are hidden. |
| accIsBusy | True if this object cannot accept input at this time. |
| accIsFloating | This object is not bound to its parent and not limited by its display area. |
| accIsMarqueed | True if this object is a scrolling text or graphics. |
| accIsAnimated | This is an animated graphic object. |
| accIsInvisible | The object is not visible because it is clipped by its parent (for example items in a long list which are not visible) or because it was expressly hidden. Does not apply to objects obscured by other applications. |
| accIsOffscreen | This object is not drawn on the screen, for example a sound or an alert object. |
| accIsSizeable | True if the object can be resized. |
| accIsMoveable | True if the object can be moved. |
| accIsSelfVoicing | The object uses text-to-speech to describe itself. Accessibility screen readers don't need to read the information. |
| accIsFocusable | The object is on an active window and can receive focus. |
| accIsSelectable | True if the object can accept selection. |
| accIsLinked | This object is formatted as a hyperlink. |
| accIsTraversed | This object is a visited hyperlink. |
| accIsMultiSelectable | True if the object supports multiple selection (the SELFLAG_ADDSELECTION flag for accSelect). |
| accIsExtSelectable | True if the object supports extended selection (the SELFLAG_EXTENDSELECTION flag for accSelect). |
| accIsAlertLow | This is an alert object with low priority. |
| accIsAlertMedium | This is a medium priority alert object. |
| accIsAlertHigh | This is a high-priority alert object. |