The Get Selected List Item action is used to populate a variable or dataset with the contents of one or more selected items in a list view. This action is ordinarily preceded by one or more Select List Item actions. Any variable used must be created in an earlier step using the Create Variable action.
Important: Only standard Windows controls will work with the Get Selected List Item action. Many applications use images or other controls that may act like Windows controls but do not support the interfaces required to detect them. The Get Selected List Item action will not work with these controls. In these cases other interactivity actions must be used such as the Copy action.
From the Task Builder Available Actions pane, open the Interactivity folder and double-click the Get Selected List Item action or drag it into the Steps pane.
In the Action box, select Get first item selected, Get last item selected or Get all items selected.
If possible, open the window containing the list you want to use. Then drag the AutoMate icon to the list. This will automatically populate the object description. If you cannot use the actual window containing the list, use a similar one and then edit the object description per the next step. You can also drag the AutoMate icon to the window that contains the list, and then click the Browse button and use the tree structure to find and select the object.
If you need to make changes to the auto-populated properties, click Edit and change the properties according to the following guidelines:
Select or clear the check boxes to indicate which properties are required.
Edit any required properties as desired. You can use wildcard characters asterisk (*) or question mark (?) in titles, classes, names, or values. For example *report* can be used to specify any name containing the word report.
To use a variable or expression, click within any box and then click the Insert Expression/Variable button and use the Expression Builder to enter it.
The properties are as follows:
Window title must be: the window title as shown in the title bar. The entry is case sensitive.
Window class must be: the class of window. The drop-down list shows the classes of all currently open windows. The entry is case sensitive.
Window handle must be: a unique value that Windows assigns each time a window is created. You might use this for situations where there may be more than one copy of the same application open.
Object type must be: the type of object, which for this action will always be List.
Object class must be: the Windows class of the object.
Object name must be: the name of the object. This is usually inapplicable for this action.
Object value must be: the value of the object. This is usually inapplicable for this action.
Object position must be: the coordinates for the position of the object on the screen.
Click the Advanced tab.
To populate a variable with the contents of the first column only:
Select First column only.
In the Populate variable with item text box, select the variable to populate.
you want to return the list index number for the item, select Populate
variable with item index, and then in the box below, select the
variable to populate.
Note: Variables must be created in earlier steps using the Create Variable action.
To populate a dataset with all list columns, select All the columns displayed in Details view. Then enter a name for the dataset to create in the Create and populate dataset box.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
Adding Task Steps
Get Selected List Item Action