Loop Tree Control Action—Setting Properties

The Loop Tree Control action is used to loop through a tree control, such as a Windows Explorer folder tree,  and populate a variable with the items in the tree. This action is used to perform some action on a group of folders or items listed in a tree structure.

The tree control must be a standard Windows tree control. Some programs may have tree structures that look and function in a similar way, but if it is not a standard Windows tree control, it will not work with this action. The window containing the tree control must be open when the step runs.  

You can create masks to include or exclude selected items, and you can limit the action to include only specified levels of the tree. If tree levels are not specified, all items within the tree will be included in the loop whether they are visible at the time the step runs or not.

When the Loop Tree Control step is created, an End Loop step is created automatically. Place the steps that will be performed on the list items between the Loop Tree Control step and the End Loop step. The steps within the block should be indented for visual clarity.

To set Loop Tree Control properties

  1. From the Task Builder Available Actions pane, open the Loop folder and double-click the Loop Tree Control action or drag it into the Steps pane.

  2. In the Populate variable with item text box, select the variable to populate.

  3. Open the window that contains the control, and display the tree control you want to use.

  4. Drag the AutoMate icon from the Loop Tree Control dialog box into the tree control.

    A black outline appears around the tree control when it is selected. When you release the mouse button, the dialog box is automatically populated with the tree control specifications.

  5. To change any of the tree control specifications, click the Edit button and edit the specifications as needed.

  6. Click the Advanced tab and enter the properties as follows:

  1. To set the Description tab properties, refer to Description Tab Options.

  2. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  3. When finished, click OK to save settings and close the properties dialog window.

To auto-indent after all steps are added

  1. In the Task Builder Steps pane, hold down SHIFT and click the first and last steps in the block so that the complete block of steps is selected.

  2. Click the Format button .

See Also

About Actions

Adding Task Steps

Loop Tree Control Action