Page 1 of 1

Open tab always in first pane

Posted: 11 Dec 2020 12:17
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

Re: Open tab always in first pane

Posted: 11 Dec 2020 21:03
by highend
What exactly are you doing to invoke the new tab?

Re: Open tab always in first pane

Posted: 12 Dec 2020 16:58
by IronJosie
It is invoked from outside like clicking on a folder on the desktop.

Re: Open tab always in first pane

Posted: 12 Dec 2020 18:19
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...

Re: Open tab always in first pane

Posted: 07 Apr 2021 17:09
by IronJosie
Thank you very much!

Re: Open tab always in first pane

Posted: 24 Oct 2024 22:03
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?

Re: Open tab always in first pane

Posted: 24 Oct 2024 22:17
by highend
Wild guess

Code: Select all

... /feed=\"::perm $P_FLD=\"%1\"; ...

Re: Open tab always in first pane

Posted: 24 Oct 2024 22:26
by xy123
That breaks the script completely (nothing happens).

Re: Open tab always in first pane

Posted: 24 Oct 2024 23:03
by highend
See the modified post: viewtopic.php?p=183458#p183458

Re: Open tab always in first pane

Posted: 24 Oct 2024 23:31
by xy123
Flawless, thank you.