Select an item in the Tree with scripting
-
hermhart
- Posts: 244
- Joined: 13 Jan 2015 18:41
Select an item in the Tree with scripting
Is there a way to focus an item in the Tree with scripting? I know I can use Focus T; and that will put focus on the Tree itself, but how can I select an item like "Network"?
Windows 11 Pro; 100% scaling
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Select an item in the Tree with scripting
One of my scripts helped you out? Please donate via Paypal
-
hermhart
- Posts: 244
- Joined: 13 Jan 2015 18:41
Re: Select an item in the Tree with scripting
OMG, I thought I tried that and it didn't work. I'm sorry. So simple too. 
The reason i want this is I have a simple script to reset my interface when I'm done and have it collapse everything, focus back to "Computer", and minimize the Window. But for some reason, the collapse would not collapse the "Network" tree item.
Thank you so much.
The reason i want this is I have a simple script to reset my interface when I'm done and have it collapse everything, focus back to "Computer", and minimize the Window. But for some reason, the collapse would not collapse the "Network" tree item.
Thank you so much.
Windows 11 Pro; 100% scaling
-
klownboy
- Posts: 4459
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440
Re: Select an item in the Tree with scripting
Hi hermhart, so I take it you were already using the commands to collapse the tree. I do something similar but I collapse using the collapse command along with changing the layout back to my "normal layout" and goto "C:\". If you haven't already, look under Help | List all Commands and type in Collapse in the search box. You'll see that Collapse Tree and Drive have keyboard shortcuts Though they may differ if you've changed key assignments. As you probably already know (but just in case), they also have command IDs like #1009 and #1010 that you can use in a script to collapse the tree.
Code: Select all
#1009 Miscellaneous | Tree | Fully Collapse Drive (Ctrl+Numpad Divide)
#1010 Miscellaneous | Tree | Fully Collapse (Numpad Divide)-
hermhart
- Posts: 244
- Joined: 13 Jan 2015 18:41
Re: Select an item in the Tree with scripting
klownboy, thank you. I actually do use those commands, they are extremely handy.
Windows 11 Pro; 100% scaling
XYplorer Beta Club