Open tab always in first pane

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
IronJosie
Posts: 7
Joined: 11 Dec 2020 12:15

Open tab always in first pane

Post by IronJosie »

Hello,

is it possible to open a new tab always in the first pane?
Currently it opens in first pane when started.
If XYplorer is already running it opens in the active/focused pane.

Thanks

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

Re: Open tab always in first pane

Post by highend »

What exactly are you doing to invoke the new tab?
One of my scripts helped you out? Please donate via Paypal

IronJosie
Posts: 7
Joined: 11 Dec 2020 12:15

Re: Open tab always in first pane

Post by IronJosie »

It is invoked from outside like clicking on a folder on the desktop.

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

Re: Open tab always in first pane

Post by highend »

This would be a two step process...

Save this code as a .reg file:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\Directory\Shell\XYplorer\Command]
@="\"C:\\Program Files (x86)\\XYplorer\\XYplorer.exe\" /feed=|::perm $P_FLD=\"%1\"; load \"C:\\Users\\this_is_my_username\\AppData\\Roaming\\XYplorer\\Scripts\\Open tab in pane1.xys\";|"
Afterwards edit the .reg file and replace the XY installation and or script folder (if necessary) and the username "this_is_my_username" with your own.
Right click the .reg file and from the context menu select "Merge".

Afterwards create the file C:\Users\this_is_my_username\AppData\Roaming\XYplorer\Scripts\Open tab in pane1.xys
and give it this content:

Code: Select all

perm $P_FLD;
    focus "P1";
    tab("new", $P_FLD);
Save it and from then on it should work...
One of my scripts helped you out? Please donate via Paypal

IronJosie
Posts: 7
Joined: 11 Dec 2020 12:15

Re: Open tab always in first pane

Post by IronJosie »

Thank you very much!

xy123
Posts: 209
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

Re: Open tab always in first pane

Post by xy123 »

highend wrote: 12 Dec 2020 18:19 Save this code as a .reg file:
If a folder has an apostrophe in its name, I get this error:

Code: Select all

File: (Internal)
Script: (Untitled)
perm $P_FLD='C:\70's'; load OpenTabInPane1; 

Overflow
0 \ 0
Any workaround possible?

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

Re: Open tab always in first pane

Post by highend »

Wild guess

Code: Select all

... /feed=\"::perm $P_FLD=\"%1\"; ...
One of my scripts helped you out? Please donate via Paypal

xy123
Posts: 209
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

Re: Open tab always in first pane

Post by xy123 »

That breaks the script completely (nothing happens).

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

Re: Open tab always in first pane

Post by highend »

See the modified post: viewtopic.php?p=183458#p183458
One of my scripts helped you out? Please donate via Paypal

xy123
Posts: 209
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

Re: Open tab always in first pane

Post by xy123 »

Flawless, thank you.

Post Reply