How to expand folders at startup

Discuss and share scripts and script files...
Post Reply
dkump
Posts: 43
Joined: 26 Oct 2012 22:13

How to expand folders at startup

Post by dkump »

When I launch XYplorer, I want it to open to My Documents but also expand Desktop in the tree. Basically I want two folders expanded in the tree and one selected. I created a startup script that does goto "Desktop" followed by goto "My Documents". This works, but the screen flickers because it shows the contents of Desktop first (in tree and right pane) and then shows the contents of My Documents. It relatively quick, but slow enough to notice see it switch folders. Is there a way expand a second folder without showing it's contents so the screen doesn't flicker. I tried showintree but it didn't help. Any other suggestions?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: How to expand folders at startup

Post by highend »

Try this:

Code: Select all

    showintree gettoken(gettoken(listfolder("Desktop", , 2), 1, "|"), -2, "\", , 2);
    goto "Documents"; // Or however that special folder is called on your system
It gets all subfolders from Desktop, chooses the first one and reduces the full path back
to the name of the special folder together with the subfolder name

Works fine here when used as a startup script...
One of my scripts helped you out? Please donate via Paypal

dkump
Posts: 43
Joined: 26 Oct 2012 22:13

Re: How to expand folders at startup

Post by dkump »

Thanks. That's a different way that I didn't realize you could do. Unfortunately the screen still flickers. My way selected the desktop while your way selects the first folder on my desktop. Both ways still selects a folder and flashes it's files before going to my documents. Ideally I want to expand a folder without selecting it and showing the files in the right pane. Thanks for the suggestion though.

Post Reply