Post Reply

Forums -> UltraMon™ -> Winsplit windows management functions replacement
Steve   2015-08-26 06:21
I have been an UltraMon user for many years and sing its praises every chance I get.

I would have put this request in the feature suggestions forum thread but it doesn’t really fit.

For MANY years now I have been using the windows management functions of Winsplit Revolution for window management. It has been a great productivity tool and I have come to heavily depend on what it could do. It is no longer supported, and has recently stopped working altogether. I have not been able to find any suitable alternative.

It occurred to me that UltraMon and its scripts may be an ideal replacement for the Winsplit functions I used, but I am not sure whether the functionality could be reproduced.

Are there a set of UltraMon scripts somewhere that moves around windows to predefined relative positions using hotkeys according to the class name of the window? If they don’t exist already is it something that could be achieved?
Christian Studer   2015-08-26 16:07
What do you mean with relative positions?

Moving a window of a specific class to a specific position would be possible via script.

Christian Studer - www.realtimesoft.com
Steve   2015-08-27 06:38
There are two sets of functions that I am most interested in.

The first uses a hotkey to move the focused window to a defined position relative to the current monitor. The position is defined as a proportion of the current monitor in percentages. A wrinkle is that for each hotkey there are three stages of position so that consecutive operations of the hotkey move the window to the next defined position in a circular manner. For example I use one hotkey to move the currently focussed window to the left half of the screen then the left 1/3 of the screen, then the left 2/3 of the screen etc. I use another hotkey similarly but for the right side.

The second uses a kotkey to move the currently focussed window to a placement (auto-place) on the screen that is unique to the window class, so separate 'default' placements can be set up unique to each window class. The placements are set by placing a window manually, and then using the hotkey, and if the window class does not already have a placement defined the user is prompted whether to save the current placement as the auto-placement.

That's a lot of words, but I hope it makes some sense.
Christian Studer   2015-08-27 14:43
Should be possible via script, I'll get started on the scripts and will post here when they're ready.

Christian Studer - www.realtimesoft.com
Steve   2015-08-28 00:32
Oh wow! I wasn't expecting that. I was just hopeing for some pointers. Thanks heaps for your help.
Christian Studer   2015-08-28 15:11
That's no problem, I have added the scripts to the script page, look for FitWndToScreenEdge and PositionWndClass. Let me know if you have any questions.

Christian Studer - www.realtimesoft.com
Steve   2015-08-30 19:43
Outstanding Christian! I will give them a workout and let you know how I find them.
Steve   2015-10-25 04:26
Have been using the scripts for a while now, and have made some small mods to tailor them. Generally they work as advertised, and that is very good. I have come across an issue with the PositionWndClass.vbs. Mostly it works fine. I found the registry locations where the positions are recorded to clear any I want to reset. A script to do that would be useful, but time is ore precious at the moment. The problem with PositionWndClass.vbs is specific to PaintShop Pro. I don't use it often so have only just found the issue. It seems that PaintShop Pro generates a different class name for each instance, including non-concurrent ones. For example Afx:00400000:8:00010003:00000000:003A052B and Afx:00400000:8:00010003:00000000:02800B33 are two such names from different instances. As a result, PositionWndClass.vbs is asking for placement confirmation each time. WinSplit did not behave this way for this program and saved the value 'Paint Shop Pro 9.exe::Afx:00400000:8:00010011:00000000:03D11993' as a window identifier. I think the script needs to use the win.Title as part of the identifier and maybe just identify by that. Not sure.
Christian Studer   2015-10-25 14:17
You'll get this with applications which use the MFC library, I have tested with PaintShop Pro and the numeric part of the class name is different each time you run the application.

I have uploaded a modified version of the PositionWndClass script which handles this better, if an application uses MFC the script will store a single position for all MFC windows created by the application.

Christian Studer - www.realtimesoft.com
Steve   2015-10-28 16:38
Thank you again. That has solved it OK.

It is SO GOOD to have this functionality back again :-)
Steve   2015-10-30 00:05
I am having a look at generalising the FitWndToScreenEdge script. Is it possible to pass a parameter into a vbs from a hotkeys Run?
Steve   2015-10-30 00:29
I have discovered an attribute of the PositionWndClass script that I suspect is not intended. Using W7 if I have no window focus (eg by clicking on the desktop) then it asks me if I want to save the current position of Progman. I am not brave enough to have said yes yet.
Steve   2015-10-30 04:12
Another, sorry. Would it be possible to exclude modal non-resizable windows in case of accidental requests while they have focus - which does happen.
Christian Studer   2015-10-30 14:50
That will work fine, just add it to the 'Application or script' field:

"C:\Temp\MoveActiveWnd.vbs" 1

Regarding dialogs: ignoring windows which have the WS_EX_DLGMODALFRAME style set should do the trick, I have uploaded a new version of the script which can do this (set the IGNORE_DIALOGS option on line 1). The desktop window gets ignored as well.

Christian Studer - www.realtimesoft.com
Forums -> UltraMon™ -> Winsplit windows management functions replacement

Post Reply