Is there a command line utility equivalent to wmctrl on Windows
I'm trying to write a remote window manager so that I can control my open windows via bluetooth using anyremote. There's wmctrl for Linux that manages windows from the command line. Is there similar tool in Microsoft Windows? I.e. A command line based window manager for Microsoft Windows.
If there are existing command line hacks that I could use to get the list of open windows, and bring a certain window to the front and give it focus, let me know.
NirCmd by Nir Sofer is a command-line tool which can manipulate windows in all sorts of ways.
It can also automate dozens of other little tasks, like shutdown, shortcuts, screenshots, volume control. A proper Swiss-army knife of a tool.
The general format of the window manipulation commands is
nircmd win show/hide/min/max/center/close title "Window Title"
but there's a whole lot more you can do.
Windows, like Unix, has multiple shells. "CMD.EXE" is by far the best known, but PowerShell is far more capable. It's built on top of .NET, and therefore can easily manipulate windows. See https://stackoverflow.com/questions/4993926/maximize-window-and-bring-it-in-front-with-powershell for an example.
An alternative to PowerShell and NirCmd is of course JP Software's TCC/LE and TakeCommand.
They have the ACTIVATE
command, that can do on Win32 pretty much all of the minimize/maximize/top/bottom/pos/close stuff that wmctrl
does for X. Of course, some wmctrl
mechanisms have no meaning on Win32 and no equivalents for ACTIVATE
. Conversely, ACTIVATE
can do some Win32 things that wmctrl
has no functions for, such as manipulation of the z order, use of the taskbar, flashing, and modification of the "topmost" flag.
They also have the KEYSTACK
command that can be used to send simulated keyboard input to windows.