Jump to content
Sign in to follow this  
archanamurthy

GUI Tree structure

Recommended Posts

archanamurthy

Hi,

I have recently started using autoit.

Can anybody tell me how to traverse between the elements of a tree structure?

Please go through the file attached.

post-38148-1216701197_thumb.jpg

Share this post


Link to post
Share on other sites
BrettF
archanamurthy

Is this in your own GUI, or a 3rd parties?

If you have a script, please post it.

Cheers,

Brett

muttley

It's a 3rd party GUI. I need to automate the traversal between the elements in this tree structure.

All the elements are mentioned in an excel file. My script has to go through each cell of the excel file and select the element on the GUI automatically.

Share this post


Link to post
Share on other sites
Zedna

Here it's as helper function:

#include <GuiTreeView.au3>

$treeview = ControlGetHandle("Document Size:", "", "SysTreeView321")
If Not SelectTreeItem($treeview,'asdf') Then MsgBox(0,'Info','Item "asdf" not found!')
If Not SelectTreeItem($treeview,'Arch A') Then MsgBox(0,'Info','Item "Arch A" not found!')

Func SelectTreeItem($tree, $item_text)
    $node = _GUICtrlTreeView_FindItem($tree, $item_text)
    If $node <> 0 Then
        _GUICtrlTreeView_SelectItem($tree, $node)
        Return 1
    EndIf
    Return 0
EndFunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.