Jump to content

Need Help With Systreeview321 Navigation


Guest Killed-a-Lot
 Share

Recommended Posts

Guest Killed-a-Lot

Hello. I did a search on all forums for the last year and looked around for quite awhile for an answer to my problem. No luck so far.

I am trying to navigate a SysTreeView321 control (like the one you get in the left pane of windows explorer when you right click on My Computer and hit the "Explore" menu option). I need to be able to navigate the hierarchy to a certain directory when I open the dialog box containing the control. Unlike Windows Explorer, the dialog box and control do not offer me the ability to type in a directory path into a edit box. The only way I have seen to navigate it so far is by using arrow keys to move up and down, as well as expand and collapse the directory structures.

Is there another way to do what I am trying to do? Using Send() over and over to do this seems rather messy, so what am i missing?

Thanks.

Killed-a-Lot

Link to comment
Share on other sites

I'm not aware of any functions that interface with the treeview and listview controls yet, but I believe they are in the pipeline.

In the meantime .. I have successfully used Send() and the intrinsic features of these two controls to "navigate by keyboard" as it were. If you know the node that you want to receive focus, you can type (ie Send())the first few characters of the node .. you're not limited to just {up} and {down}. This works for both listview and treeview.

BTW .. if you press arrow-right on a node, it opens the node. which means you can navigate the hierarchy underneath.

HTH

Link to comment
Share on other sites

Well, you can use ControlSend. It cannot send Alt keys, but it can send keys to hidden and non-active windows:

ControlSend("titleOfWindow","","SysTreeView321","keystrokes")

Useful tips for others' benefit:

  • Send("{NUMPADMULT}") will exapand ALL subfolders recursively--but this can take a few minutes on a a folder such as C:\
  • Send a lowercase letter of the alphabet to jump to the next folder/file beginning with that letter.
If this doesn't help, then bug Larry; he's responsible for Control-manipulation functions :whistle:

EDIT: Dang--too slow again. I think I'll call it a night *yawn*

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Guest Killed-a-Lot

Thanks for the tips everyone. I have not played with ControlSend() yet. I am writing the script right now, so I will play with it. I will post back sometime tomorrow to let you know if I got it working. :whistle:

Thanks Again,

Killed-a-Lot

Link to comment
Share on other sites

well i know this stupid trick works in regedit, but i dunno if it will work for you in a tree viewing program. so here is the stupid trick.

send("the exact name of the first branch goes here {enter} or {space} or {RIGHT} cannot remmber")

etc. until you get to the folder you want. :whistle:

example

send("My Computer{RIGHT}")

you'll get the idea.

Edited by beerman
Link to comment
Share on other sites

Guest Killed-a-Lot

beerman,

That's basically what I ended up doing. Unfortunately the program saves the last state of the tree view control when it closes. The next time I open it up I need to get it to a baseline (all closed) so I can then navigate properly through it.

Does anyone know a simple way to collapse all entries? The opposite of what CyberSlug suggested with Send("{NUMPADMULT}")?

Thanks.

Killed-a-Lot

Link to comment
Share on other sites

Does anyone know a simple way to collapse all entries?

Collapsing the top level then refreshing seems to close all the subfolders so you can start over. This works on Win2K/XP, pretty sure it works on 9x/ME. :whistle:

Send("My Computer{NUMPADSUB}{F5}{NUMPADADD}")

Left and Right also work, but if a folder's already closed you get sent to that folder's parent... B)

Send("My Computer{LEFT}{F5}{RIGHT}")
Edited by ryanm
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...