Open Shortcut Location in Other Pane ?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
GreetingsFromPoland
Posts: 284
Joined: 29 Sep 2022 14:20
Location: Win10 @125%

Open Shortcut Location in Other Pane ?

Post by GreetingsFromPoland »

hi! is there a command or scripting available that would allow me to select a shortcut (LNK) in one pane and have it open the Target Location in the other pane ?

i use:

Code: Select all

#1062;
(Open Folder in Other Pane) quite a bit. recently i found the need to have this functionality. what i have been doing is :

1. in pane 2, double-click the shortcut (LNK) to go to the Target Location
2. then use "Go Here in Other Pane" command (via shortcut or hamburger) (now pane 1 is in the Target Location)
3. still in pane 2, use Back to go back to the original location
4. continue with what i was doing, e.g. copying, moving, etc.

thought it was quick to just select a shortcut, use a command and the other pane is in the Target. in the Customize Keyboard Shortcuts dialog, i use the Jump for words like Open, Pane, etc. and didn't see anything about shortcuts.

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

Re: Open Shortcut Location in Other Pane ?

Post by highend »

Code: Select all

    if (<curext> LikeI "lnk") {
        $target = property("#ShortcutTarget", <curitem>);
        if (exists($target) == 2) {
            focus "PI";
            tab("new", $target);
            focus "PI";
        }
    }
?
One of my scripts helped you out? Please donate via Paypal

GreetingsFromPoland
Posts: 284
Joined: 29 Sep 2022 14:20
Location: Win10 @125%

Re: Open Shortcut Location in Other Pane ?

Post by GreetingsFromPoland »

holy crap! this is amazing. it works perfectly!

in my setup i have a default tab and several other locked tabs. since this script calls tab() with "new", the new tab is created as expected. i'm reading the Scripting Command Reference now to see what would be need to be changed to have it use the Default tab instead of creating a new one.

i'm thinking this will work, but may not be the "correct" way to do it :

Code: Select all

focus "PI";
seltab 1;
tab("relocate", $target);
focus "PI";

Post Reply