archanamurthy Posted July 22, 2008 Posted July 22, 2008 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.
BrettF Posted July 22, 2008 Posted July 22, 2008 Is this in your own GUI, or a 3rd parties? If you have a script, please post it. Cheers, Brett muttley Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
archanamurthy Posted July 22, 2008 Author Posted July 22, 2008 Is this in your own GUI, or a 3rd parties?If you have a script, please post it.Cheers,BrettmuttleyIt'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.
Zedna Posted July 22, 2008 Posted July 22, 2008 #include <GuiTreeView.au3> $tree = ControlGetHandle("Document Size:", "", "SysTreeView321") $node = _GUICtrlTreeView_FindItem($tree, 'asdf') If $node <> 0 Then _GUICtrlTreeView_SelectItem($tree, $node) Else MsgBox(0,'Info','Item not found!') EndIf Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted July 24, 2008 Posted July 24, 2008 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 Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now