navigating to a location in a tree view correctly

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
tim167
Newbie
Posts: 13
Joined: Thu Sep 16, 2004 11:38 am

navigating to a location in a tree view correctly

Post by tim167 » Tue May 24, 2005 3:47 pm

One of the programs I am trying to script is using a file menu in tree view for choosing the destination folder.
How can I point this to a certain folder consistently?
If for example I use a fixed combination of the arrow keys, when a subfolder is added or removed, expanded or collapsed, the up-down-left-right key press sequence will be changed and it will end up somewhere else... :?
This kind of menu doesn't allow pasting a folder location directly in an ardess bar because it doesn't have one...
How do I get around this?

An answer to this would help me very very much!
Thanks.
tim
Last edited by tim167 on Tue May 24, 2005 4:02 pm, edited 1 time in total.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue May 24, 2005 3:52 pm

Check to see if there is an option you can select to expand the complete tree.

Once that is done then you may be able to use fixed counts of up/down arrows.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

tim167
Newbie
Posts: 13
Joined: Thu Sep 16, 2004 11:38 am

Post by tim167 » Tue May 24, 2005 4:07 pm

Thank you for your quick reply!

Unfortunately there is no 'expand all' option.
Or is there a standard windows key combination that might work here ?
I also thought of trying to solve this by sending several left-arrow keystrokes to collapse all and then starting the navigation with right and down arrows, but the window remembers the state of subfolders so they can be collapsed or expanded i.e. they don't behave in a predictable way...
Also, there might be new folders added or removed in the tree.

User avatar
JRL
Automation Wizard
Posts: 3505
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue May 24, 2005 4:13 pm

Another possibility would be to open a command window, change directory to the appropriate location then use the line "start [Drive] [path] [application]", and see if you are placed into the correct directory when you go to "File" "Open" in the app. This works in some applications, does not work in others.

Hope his helps,
Dick

tim167
Newbie
Posts: 13
Joined: Thu Sep 16, 2004 11:38 am

Post by tim167 » Tue May 24, 2005 4:30 pm

I tried your suggestion in the following manner:
I made a .bat file containing the lines:


cd c:\content\workfolder
start c:\tools\mfi\mfitool.exe


and ran it by doubleclicking it

It does not seem to affect the tree view window inside the program (wich is used for setting source and destination for file conversions)

User avatar
JRL
Automation Wizard
Posts: 3505
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue May 24, 2005 4:38 pm

If you alter your batch file by placing a file name at the end of the line:

start c:\tools\mfi\mfitool.exe [filename]

you can open one file and it might also affect the result of "File" "Open"

Another thought. Is there possibly a way to change the default directory? For Example in Microsoft Excel you can go to "Tools" "Options" pick the "Genera" tab and change the default file directory. Afterward when you pick "File" "Open" you are looking at the new directory.

Hope this is helpful,
Dick

tim167
Newbie
Posts: 13
Joined: Thu Sep 16, 2004 11:38 am

Post by tim167 » Tue May 24, 2005 5:06 pm

That looks like an interesting lead.
There is no such option in the program but I think it reads some preferences file for loading recent paths etc... If I can find a way to modify this pref file and have the program read it correctly my problem is solved...
I'll let you know if it works...
thank you !

tim167
Newbie
Posts: 13
Joined: Thu Sep 16, 2004 11:38 am

Post by tim167 » Fri May 27, 2005 3:02 pm

It works!
I make Msched delete the preference file of the program and replace it by a fixed one I made.
It now starts up with all the right paths in the right places.
I made 5 different pref files so Msched only needs to replace the pref file with another one if it needs the program to use other paths...
Thanks for your suggestions guys!
Tim

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