Macro not working :(

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
MBaas
Posts: 683
Joined: 15 Feb 2016 21:08

Macro not working :(

Post by MBaas »

I have a problem with a very basic macro and I can't see what I'm doing wrong:
::focus "PI";text <get "path" i>;goto <get "path" i>;focus "PI";
The idea if to set the path of the inactive pane to the path of the active pane. (Maybe there's a more direct approach?) Anyway - the text command shows the correct oath, but then goto doesn't go - so the inactive panel (which was actived before) doesn't change path,
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

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

Re: Macro not working :(

Post by highend »

::$a=<curpath>;focus "PI";goto $a;focus "PI";
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 683
Joined: 15 Feb 2016 21:08

Re: Macro not working :(

Post by MBaas »

Thanks - that works!

Except...when I add it to a Hamburg menu like this:
|>Go &here in other pane|$a=<curpath>;focus "PI";goto $a;focus "PI";
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

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

Re: Macro not working :(

Post by klownboy »

This can be done even easier with command ID, #810, followed by focus "pi".

#810 is "Go here in other pane" but it does not focus the other pane, so the focus is still necessary.

Code: Select all

::#810;focus "pi";

MBaas
Posts: 683
Joined: 15 Feb 2016 21:08

Re: Macro not working :(

Post by MBaas »

That's neat! And actually - the focus switching I did was because I did not wa nt to change focus (I wanted focus to stay on the original tab), so a simple #810; is just perfect for this case! (I hadn't realized this existed! :masked: )
And that is certainly also doable in the Hamburger menu :appl:
:tup:
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

Post Reply