Function Reference |
Sends a command to a SysTreeView32 control (similar to ControlTreeView).
#include <r_SysTreeView.au3> |
title |
The title of the window to access. |
text |
The text of the window to access. |
controlID |
The control to interact with. See Controls. |
command |
The command to send to the control (see below). |
option1 |
Additional parameter (usually "item") required by most commands, but optional in GetSelected. |
option2 |
Additional parameter, required for SetRadio, optional for WhichRadio. |
Command, Option1, Option2 |
Operation |
"Check", "item" |
Checks a check-box (it CAN be used to set a radio-button, though "SetRadio" would usually be neater).Returns True/False for success, or -1 for an error. Note that this *may* change the value of "Selected". Be careful if your code relies on the value of "Selected" before/after this command. |
"Collapse", "item" |
Collapses an item to hide its children. |
"Exists", "item" |
Returns True if an item exists, False if not. |
"Expand", "item" |
Expands an item to show its children. |
"GetItemCount", "item" |
Returns the number of children for a selected item. Failure (eg. item doesn't exist) returns -1 and sets @error to 1. |
"GetSelected" [, UseIndex] |
If UseIndex is not specified, returns the text-form item-reference of the currently selected item. If UseIndex is 1, returns the item-reference of the currently selected item in numeric form eg. "#0|#1". |
"GetText", "item" |
Returns the text of an item. |
"IsCheckBox", "item" |
Returns True/False that the specified item is a check-box, or -1 for an error (eg. not found). See also "IsRadioButton", "IsRadioGroup". |
"IsChecked", "item" |
Returns True/False that a check-box is checked. Failure returns -1 and sets @error to 1.(Can be used to interrogate a radio-button, though usually "WhichRadio" would be better.) |
"IsRadioButton", "item" |
Returns True/False that the specified item is a radio-button, or -1 for an error (eg. not found). See also "IsCheckBox", "IsRadioGroup". |
"IsRadioGroup", "item" |
Returns True/False that the specified item is (the heading for) a radio-group, or -1 for an error (eg. not found). See also "IsCheckBox", "IsRadioButton". |
"Select", "item" |
Selects an item (eg. to then use "GetSelected". |
"SetRadio", "item", "button-identifier" |
Sets (pushes or checks) the specified radio-button in the named radio-group. The button-identifier is either the text on the radio-button, or its 0-based index-number. Failure returns -1 and sets @error to 1.Note that this *may* change the value of "Selected". Be careful if your code relies on the value of "Selected" before/after this command. |
"WhichRadio", "item" [, AsIndex] |
Allows you to determine which radio-button of "item" radio-group is checked/set. If AsIndex is not specified, or False, the result is the text on the radio-button. If AsIndex is True, the result is the (0-based) index-number of the radio-button within the radio-group, eg. 0 or 1 Failure returns -1 and sets @error to 1. |
"Uncheck", "item" |
Unchecks a check-box item (NOT a radio-button - you can't un-check a radio-button!). Returns True/False for success, or -1 for an error. Note that this *may* change the value of "Selected". Be careful if your code relies on the value of "Selected" before/after this command. |
command or the window/control could not be found) then ControlSysTreeView returns -1 and @error is set to 1.The "item" parameter is a string that is used to identify a particular treeview item using a combination of text (labels) and/or (0-based) indices.
Heading1
----> Heading1SubItem1
----> Heading1SubItem2
----> Heading1SubItem3
----> ----> Heading1SubItem3SubItem1
Heading2
Heading3
| Item | Item Reference |
| Heading1 | "Heading1" or "#0" |
| Heading2 | "Heading2" or "#1" |
| Heading1SubItem2 | "Heading1|Heading1SubItem2" or "#0|#1" |
| Heading1SubItem3SubItem1 | "Heading1|Heading1SubItem3|Heading1SubItem3SubItem1" or "#0|#2|#0" |
As AutoIt is a 32-bit application some commands are not available when referencing a 64-bit application as Explorer when running on 64-bit Windows.
ControlCommand, ControlDisable, ControlEnable, ControlFocus, ControlGetPos, ControlGetText, ControlHide, ControlClick, ControlListView, ControlMove, ControlSetText, ControlShow, ControlTreeView, StatusbarGetText, TreeViewItem, WinMenuSelectItem, WinGetClassList
; Author: RAC |