Page 1 of 1
Script To "Activate" C:\ Tab(1), Panel 1 on Start-up
Posted: 19 Apr 2012 05:44
by Dark Wizard
I have a C:\ Tab(1st position) on Pane 1 and the issue I'm having is if I don't "Activate" C:\ Tab(1) before closing XYplorer, then when I click on "My Computer" again, it opens a duplicate C:\ Tab.
Now when I "Activate" C:\ Tab(1) on Pane 1 before closing XYplorer and (re)open it from "My Computer", it will automatically open in C:\ Tab(1) on Pane 1 without opening another C:\ Tab.
I would like a script that loads at start-up or at close that automatically "Activates" C:\ Tab(1) on Pane 1 by Default.
Is this possible?
Note: C:\ Tab(1) on Pane 1 is set to Lock Location & Home. Also Pane 1 is "Activated" on Start-up By Default, but it doesn't "Activate" C:\ Tab(1), it "Activates" last tab used on Pane 1, which is typically C:\Program Files Tab(2) which is set as a Default Tab.
Thanks!
Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up
Posted: 19 Apr 2012 10:10
by highend
If I use a configuration like yours (two tabs, one locked on the first position and a default tab right next to it) I activate tab 1 manually, save my configuration and I'm done. You should probably switch off F9 - Startup & Exit - Save settings on exit?
Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up
Posted: 20 Apr 2012 05:33
by Dark Wizard
The issue with that is I have C:\Program Files as Tab(2) on Pane 1 as a Default Tab. If I would do the following (from above) and click "My Computer" it will open a new Tab C:\ after C:\Program Files [Default Tab] on Start-up, which drives me crazy for some reason.
I'm hoping there's a way to automatically run a script at Start-Up to Activate C:\ Tab(1) on Pane 1.
Any idea's?
Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up
Posted: 20 Apr 2012 09:17
by admin
Quote from the Help file, chapter
Command Line Switches:
/script
You can run a script on startup directly from the command line. The switch is /script=[script resource], where [script resource] can be:
1) The path to a script file (commonly called *.xys). The file spec is resolved as in the script command load, so you can skip the XYS extension. You can also skip the path if the XYS file is located in the default scripts folder. For example
XYplorer.exe /script=test
would run the file <xyscripts>\test.xys on startup. If the path contains spaces it must be quoted:
XYplorer.exe /script="C:\Zen\test one.xys"
2) A script. It must be preceded by ::, and it must not contain double quotes or other characters that might lead to problems when parsing the command line. For example
XYplorer.exe /script="::msg 'Welcome to XY!';"
Note the double quotes surrounding the whole argument which are needed because of the spaces in the script line.
Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up
Posted: 20 Apr 2012 09:48
by highend
Don, isn't there any scriptable command to switch to a specific tab (by index (although name / path etc. would be nice as well))?
Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up
Posted: 20 Apr 2012 10:02
by admin
seltab
Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up
Posted: 20 Apr 2012 10:43
by highend
admin wrote:seltab
Thanks.
So why don't you just invoke xyplorer with:
XYplorer.exe /script="::seltab 1;"
Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up
Posted: 20 Apr 2012 23:46
by Dark Wizard
XYplorer.exe /script="::seltab 1;" works to the point of selecting C:\ Tab 1, panel 1 as active at start-up BUT when you close and (re)open "My Computer" a C:\ Tab(3), pane 1 still opens at start-up, then it selects tab 1 as default.
As a workaround:
XYplorer.exe /script="::seltab 1, tab("close", , 3);"
Works perfect, because I have a habit of always having C:\Program Files Tab(2), Pane 1 as active before closing XYplorer.
Thanks