Page 1 of 1

PanelSwitcher

Posted: 10 Nov 2026 19:45
by Native2904
Hi everyone,

As they say, it's better to give than to receive ^^, so I wanted to share a tiny little command I put together for my small laptop.

What I wanted to achieve was this: whenever I switch from 2-pane mode to 1-pane mode (#800), XYplorer should automatically reduce its width by half as well, since I find Windows' Snap feature more annoying than useful.

After posting my question here, it occurred to me the following day that Windows already has a built-in solution for this: WIN + ← / →.
I also found something in the scripting help, but as far as I could figure out, there is no SendKeys command for the Windows key.

So I decided to use NirCmd.exe instead...

Code: Select all

#800;
 focus "XY";
  if (get("#800") == 0) {
    run "nircmd.exe sendkeypress lwin+left";
  } else {
    run "nircmd.exe win max foreground";
  }
NirCmd Command Reference - sendkey
NirCmd Command Reference - win

If there's a smarter way to achieve this using XYplorer's built-in commands, I'm all ears!

Re: PanelSwitcher

Posted: 15 Nov 2026 11:58
by admin
Thanks for WIN + ←, I did not know about it :)

Re: PanelSwitcher

Posted: 15 Nov 2026 13:18
by Native2904
I can hardly believe a coding guru like yourself hasn't run into this yet!
Good thing we're well past the days of shooting the messenger. :whistle: :biggrin:

Re: PanelSwitcher

Posted: 15 Nov 2026 14:11
by admin
coding guru ... that's why! Coding all the time. No time to play with Windows.