PanelSwitcher
Posted: 10 Nov 2026 19:45
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...
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!
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 - win
If there's a smarter way to achieve this using XYplorer's built-in commands, I'm all ears!