Windows window management with multiple monitors?

Posted by: drakino

Windows window management with multiple monitors? - 26/03/2013 14:50

I'm back to using a Windows machine at work. It's a laptop that I use both standalone with it's built in screen, and also use it docked to two external monitors.

I have a few apps I'd like to have open on the second desktop monitor. I position them where I want and it's good. However if I undock and use just the built in screen, Windows brings all those apps back to the main screen (as it should). Where it falls apart is when I redock, and have an empty secondary screen greeting me.

Has anyone here found a good scripting interface or program to allow my system to just put specific windows back in their proper place with both monitors? I've found a number of tools that make it easier to move windows between multiple desktops, but nothing in the way of positioning apps automatically.
Posted by: K447

Re: Windows window management with multiple monitors? - 26/03/2013 15:02

I seem to recall that the Matrox PowerDesk software managed such situations nicely, but I last used their stuff a few years back.

Dunno whether it can be cribbed to run without the actual Matrox video hardware installed.
Posted by: Roger

Re: Windows window management with multiple monitors? - 26/03/2013 16:39

Ultramon has a scripting API. Never used it, though.
Posted by: tfabris

Re: Windows window management with multiple monitors? - 26/03/2013 17:13

Ultramon, that's the name I was trying to remember.

Never used it, but I think it's been discussed on this board before.
Posted by: Roger

Re: Windows window management with multiple monitors? - 26/03/2013 17:52

Originally Posted By: tfabris
Ultramon, that's the name I was trying to remember.

Never used it, but I think it's been discussed on this board before.


To clarify: I use ultramon, but I've never tried the API.
Posted by: drakino

Re: Windows window management with multiple monitors? - 26/03/2013 19:28

Originally Posted By: K447
Dunno whether it can be cribbed to run without the actual Matrox video hardware installed.

I managed to install it, but clicking Desktop Management where this feature lives results in a "No Matrox hardware detected" dialog. Being that this is a work system, not really comfortable going farther in getting it to work.
Posted by: drakino

Re: Windows window management with multiple monitors? - 26/03/2013 19:30

UltraMon has been mentioned here before, though not for this use case. (Mostly wallpaper or desktop icon placement, both still surprising gaps in Windows) Even eyeballed their site before the post, and the feature isn't really mentioned.

Digging into the app, I understand why. For what I want, I'm going to need to script it quite a bit. It's doable, but I'm questioning the value of paying $40 to then require a lot of scripting time. I can buy an entire OS upgrade for half that on my hardware of choice, with the scripting interface built in.

Hopefully some other options come up in my search. Otherwise UltraMon may be it.
Posted by: larry818

Re: Windows window management with multiple monitors? - 26/03/2013 22:21

Ultramon is good, but barely extends the windows native capability. Mostly it just makes everything available. I use it.

For your application, I think it's the way to go. Your apps still won't load where you want them to, but a right click on the task bar icon and the next click sends it to the screen you want. It's beyond easy and almost a motor skill for me now.
Posted by: JBjorgen

Re: Windows window management with multiple monitors? - 27/03/2013 01:25

Ultramon is what Windows should have been out of the box. It can also add a button up by the minimize, maximize, close buttons to flip to the next screen, which is really nice.

That said, I never messed with the scripting.
Posted by: drakino

Re: Windows window management with multiple monitors? - 27/03/2013 12:52

Originally Posted By: larry818
For your application, I think it's the way to go. Your apps still won't load where you want them to, but a right click on the task bar icon and the next click sends it to the screen you want. It's beyond easy and almost a motor skill for me now.

I guess I'm just not seeing the $40 value there, considering its just as easy to drag the windows. The real value would be in resizing and repositioning them too, where I'm wasting more time. The laptop resolution is lower then the desktop monitors, so I end up with a smaller Outlook window for example even when it is on the right desktop screen.

Does Windows under the hood simply not offer an easy way for a program to do this? On OS X, the apps can be moved, and resized easially via their exposed AppleScript support, including getting the current coordinates and size. I'm potentially seeing a side programming project if the hooks are there.

I may also just decide one monitor is enough and return the second one to IT.
Posted by: tfabris

Re: Windows window management with multiple monitors? - 27/03/2013 15:30

I've been using NIRCMD.EXE to position windows from batch files. There's also VBscript or powershell commands. The trick is getting them to trigger based on the dock/undock event, instead of just running in the background. Hm. I wonder how that could be done...
Posted by: tfabris

Re: Windows window management with multiple monitors? - 27/03/2013 15:32

Hm. Windows Task Scheduler can fire off a task (i.e., batch file, script, whatever) when a specific windows EVENT is logged. I wonder if docking and undocking will trigger a Windows event.
Posted by: tfabris

Re: Windows window management with multiple monitors? - 27/03/2013 15:36

... Or power/charging state. Maybe there's a way to have a script run that checks how many pixels are available on the desktop each time the machine changes state (onto AC power, onto battery, resume from suspend or hibernate, etc.) and then positions windows based on the available desktop size. If the desktop size didn't change, then do nothing.
Posted by: drakino

Re: Windows window management with multiple monitors? - 27/03/2013 15:58

I know C# makes it easy to read the screen resolution, as my old game resolution tool did so. Just need to research what callbacks exist to reexamine the resolution and take an action.

NIRCMD.exe looks interesting. With no real solid out of the box tool coming up in the search (outside the Matrox solution), it looks like scripting/making my own small app may be the route to go.
Posted by: Roger

Re: Windows window management with multiple monitors? - 27/03/2013 16:21

Originally Posted By: drakino
it looks like scripting/making my own small app may be the route to go.


PowerShell + WASP (http://wasp.codeplex.com/)?
Posted by: drakino

Re: Windows window management with multiple monitors? - 27/03/2013 16:40

Awesome, thank you Roger. That looks very promising.

This is where I give Microsoft the credit they deserve. Powershell continues to impress me because it's a proper modern, forward facing addition to Windows. They didn't try to bring too much of the old spaghetti legacy. Being that Windows still has a place in my job, I want to become better at the newer tools they provide.

I still cringe when I see massive CMD.EXE scripts doing all sorts of hacky things to work around limitations. Thankfully I haven't seen this with Powershell.
Posted by: tfabris

Re: Windows window management with multiple monitors? - 28/03/2013 17:37

Agreed, WASP looks cool. I wonder if it could take the place of some things which, up to now, I've been accomplishing with AutoIt.
Posted by: drakino

Re: Windows window management with multiple monitors? - 23/04/2013 19:05

Ultimate solution, I did just put aside the second monitor and find I don't really miss it.
Posted by: tfabris

Re: Windows window management with multiple monitors? - 23/04/2013 19:36

I'm trying to decide if I want to nab that second monitor from you. Seems like everyone got those fancy new high-rez monitors here except for me. On the other hand, the monitor I *am* using, that's slightly lower rez, actually works better for overall readability for me.
Posted by: drakino

Re: Windows window management with multiple monitors? - 23/04/2013 21:58

I was rather tempted to add to my post *waits for Tony to come running over*

smile