GetTreeNode

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
BobDDstryr
Junior Coder
Posts: 38
Joined: Fri Oct 22, 2010 2:47 am

GetTreeNode

Post by BobDDstryr » Sat Dec 11, 2010 3:22 am

Hey guys,

I've been having some trouble using GetTreeNode.

I can provide screenshots, but wasn't sure how to attach them, so will do my best to explain without them.

I have a window, Restore Wizard. It has 2 trees, and 4 buttons.
the first tree has:

fresh.gho
-14.85GB Data

The second has:
Disk 1
-(C:)
-EXTENDED (D:)

Now - in the first tree, which is on the left, if fresh.gho is selected, the 14.85GB is also selected. and in the second tree if the Disk1 is selected, the C and EXTENDED are also both selected. Or you can choose just 14.85GB Data and C or EXTENDED

Now - in the example above, I know that I can select what I need by hitting down (to select 14.85GB), then tab, then down (selecting C), then hitting one of the buttons. but if I were to add an additional partition or something, but script would break, and could do the wrong thing, so I'd like to be able to figure out how trees work.

So; looking at the System Windows, its got two trees:
787388 SysTreeView32 "Tree1"
2491126 SysTreeView32 "Tree1"

So - if I run the command:
GetTreeNode>Restore Wizard,SysTreeVew32,0,14.85GB Data,0,0,node,handle
messagemodal> node handle
I get 0 787388

If I run the command:
GetTreeNode>Restore Wizard,SysTreeView32,1,EXTENDED (D:),0,0,node,handle
messagemodal> node handle
I get 1 2491126

if I run:
GetTreeNode>Restore Wizard,SysTreeView32,0,blaarg,0,0,node,handle
messagemodal> node handle
I get 0 787388

Also - if I add:
let>win_handle=1
setfocus>handle
let>win_usehandle=0
in between - then the second command (EXTENDED (D:)) alternates between returning 1 2491126 and 0 787388. also, if I watch, it looks like each command it just jumps to the other tree when I run the setfocus>handle - is it somehow getting confused since both are named "Tree1"? or am I doing something wrong here?

The fact that searching for blaarg returns a result, makes me wonder what GetTreeNode is supposed to return if it doesn't find anything.

Also, in the example in GetTreeNode, after getting the node, it shows:
Press Home
Press Down * result
Press Right

Is this the only way to go through a tree - to select it, and press down enough times, and then to the side, or is there a way to tell it to select a sepecific node? Is there a way to read a specific node, so I could try that, to see if I can read tree entries first?

Any help in figuring this out would be appreciated.

Thanks.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts