Changing the inactive pane's tab or folder w/o activation

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
klownboy
Posts: 4423
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440

Changing the inactive pane's tab or folder w/o activation

Post by klownboy »

Hi, does anyone know if there is a way via scripting to go to a specific folder (e.g., C:\) or select a locked tab (already set on C:\) in the inactive pane (pane 2) without actually going into (opening/focusing) that pane. I have a small script that sets my so-called base setup (e.g., root of C:\), with all the my "normal" navigation panel, menu and tool bar arrangements something like the code below. I'm using this many times a day. But in the same script, I'd also like to establish my pane 2 to my base location instead of some oddball place I last left it in when using pane 2. So when I do return to pane 2, it will already be in my tab #1 position which happens to be the root of C: drive. Obviously, the main point is within the script, I want to do this without having to change to pane 2 to accomplish the above. Is that possible or maybe it happens fast enough that I shouldn't care?

Code: Select all

     seltab 1;#1040;    //or use #552;goto "C:\";#1009;#1040;
     if get(#660) {#660;}    // Address Bar
     if !get(#661) {#661;}   // Tool Bar
     if !get(#662) {#662;}   // Tab bar
     if !get(#663) {#663;}   // Nav Pnl
     if !get(#664) {#664;}   // Show Catalog
     if get(#665) {#665;}    // Info Pnl
     if !get(#670) {#670;}   // Status Bar
     if get(#671) {#671;}    // Breadcrumb Bar
     if !get(#1061) {#1061;} // Menu Bar
     if get("#800") {#800;}  // Dual Pane
I know I can call out Command ID #811 to "swap panes", use seltab 1, and then call out #811 again, but I was curious if there might be a way without actually swapping panes.

I noticed that the last tab used is spelled out in the current "pane.ini" file [General] | Location in the pane directory, but I was hoping I wouldn't have to resort to using "setkey" to change that value. There's also variable <path2> which I can obtain but can I change it directly?

By the way, does anyone know when the "t" sub directory is make under the pane directory? I noticed it appears to be there only when the pane(s) is in use or active.
Thanks,
Ken

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Changing the inactive pane's tab or folder w/o activatio

Post by TheQwerty »

Your best bet might be to use the experimental dual location feature.

This will set pane 2 to 'C:\' without changing pane 1 or which pane is active.

Code: Select all

goto 'DUAL:||C:\';
EDIT: You can also use scripts so if you just want to select a different tab you could do:

Code: Select all

goto 'DUAL:||seltab 2';
/edit
klownboy wrote:I noticed that the last tab used is spelled out in the current "pane.ini" file [General] | Location in the pane directory, but I was hoping I wouldn't have to resort to using "setkey" to change that value. There's also variable <path2> which I can obtain but can I change it directly?
XY variables are read only, and while you can SetKey that value you'll have to restart XY to get it noticed. Though you could change the value in an unloaded tabset and then use the TabSet SC to load it to the inactive pane.
klownboy wrote:By the way, does anyone know when the "t" sub directory is make under the pane directory? I noticed it appears to be there only when the pane(s) is in use or active.
I believe this contains temporary copies of the loaded tabsets when they have changed after being loaded. This allows the original tabsets to be untouched in case the user wants to revert to them or save changes to a new tabset instead of overwriting the original ones.

klownboy
Posts: 4423
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440

Re: Changing the inactive pane's tab or folder w/o activatio

Post by klownboy »

Thanks TheQwerty, I've been using DUAL quite a lot lately in some small scripts, but I didn't think to use it in this case. "goto 'DUAL:||C:\';" of course leave you in Dual Pane which I didn't want, but I simply put a #800 for Dual Pane to take me back to single pane. What really surprised me, was the fact that when you run ::goto 'DUAL:||C:\';#800; in the AB it does it in such a way that you have absolutely no flicker once so ever (and that's with a starting point of some oddball folder in pane 2). It's apparently doing it completely in the background. My initial worry obviously was not to go into the other pane and seeing flicker associated with that. Since this works very quickly and behind the scenes, maybe I should just eliminate the first line of the above script and simple use...

Code: Select all

 goto 'DUAL:C:\||C:\';#800;#1040;
Thanks again,
Ken

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Changing the inactive pane's tab or folder w/o activatio

Post by TheQwerty »

klownboy wrote:What really surprised me, was the fact that when you run ::goto 'DUAL:||C:\';#800; in the AB it does it in such a way that you have absolutely no flicker once so ever
Hmmm.. I would have expected a flicker as well. :? Pleasant surprise!

The other thought would have been to use one of the 'in Other Pane' commands:
#810 Panes | Go Here in Other Pane
#1062 Miscellaneous | Go To | Open Folder in Other Pane
#1063 Miscellaneous | Go To | Open Folder in Other Pane in New Tab
But they all activate dual pane as well.

Oh well, glad that works for you!

klownboy
Posts: 4423
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440

Re: Changing the inactive pane's tab or folder w/o activatio

Post by klownboy »

As a quick follow-up...I now see that I do get a bit of "dual pane flicker" if I run

Code: Select all

goto 'DUAL:C:\||C:\';#800;#1040;
I experience no "dual pane flicker" if I run the script as shown on the first post and use goto 'DUAL:||C:\';#800; at the end of it, simply to ensure pane 2 is set on "C:\".
Thanks again,
Ken
Last edited by klownboy on 23 May 2014 12:13, edited 1 time in total.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Changing the inactive pane's tab or folder w/o activatio

Post by SkyFrontier »

Any way to get count of tabs for the inactive pane, without activating it?

echo tab(get, c); // works for the active pane
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Changing the inactive pane's tab or folder w/o activatio

Post by TheQwerty »

It could probably be read from one of the INI files but that would require saving them first.

I cannot recall which key would have this but if you have the INI files in front of you it shouldn't be too difficult to figure out.

Post Reply