Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Discuss and share scripts and script files...
Post Reply
Dark Wizard
Posts: 3
Joined: 19 Apr 2012 05:29

Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Post 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!

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Post 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?
One of my scripts helped you out? Please donate via Paypal

Dark Wizard
Posts: 3
Joined: 19 Apr 2012 05:29

Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Post 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?

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Post 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.

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Post 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))?
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Post by admin »

seltab

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Post by highend »

admin wrote:seltab
Thanks.

So why don't you just invoke xyplorer with:

XYplorer.exe /script="::seltab 1;"
One of my scripts helped you out? Please donate via Paypal

Dark Wizard
Posts: 3
Joined: 19 Apr 2012 05:29

Re: Script To "Activate" C:\ Tab(1), Panel 1 on Start-up

Post 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

Post Reply