Jump to content

_SplitMon:Window Mgmt Suite!


fisofo
 Share

Recommended Posts

UPDATE Nov 6th, Version 3.1.0 Released!

What's New v3.1.0:

  • Improved the WinMove functions to use percentages rather than straight pixel location.
  • Improved virtual monitor usage by making the gridmatch function a bit less exacting.
What's New v3.0.6:

  • Moved some dllcalls over to _WinAPI_* Functions instead, which made some code cleaner
  • Updated hook.dll to the latest version
  • Updated code to be non-language dependent (Thank you Thomas for the debug help!)
  • updated the "virtual multi-monitor" code to be smarter in detecting the task bar position

What's New v3.0.5:

  • A lot of stuff! I'm not really "actively" developing this much now as it works pretty well, but in any case, I've resolved a few more bugs I found, improved the WinSpaces functionality, and added a WinSplit option for windows to overlap. Vista functionality is improved a bit now too (although it worked before).
What's New v3.0.0:

  • WinSpaces!
    • You can now create a memorized group of window positions called a "WinSpace" from the tray menu to be called up at a later time. Not only that, but the program will be started if it's not already running.
  • Define Virtual Monitors!
    • If you run a Matrox card or if you use multiple monitors in Citrix/RDP, the script can auto-detect the number of monitors. Additionally, you can choose to force a number of monitors to be used Ex: Split a single widescreen monitor into more than just 2 sections!
  • Define Maximize Redirection Zones!
    • Note: Redirect Maximize now only occurs when the WinSplit Hotkey is pressed.
    • Rather than have a maximized window get sent to half the screen, you can define custom regions for the window to move to.
  • Other Changes:
    • All comments have been moved to Tooltips! If you want more details on something, mouse over the different options in the Settings Dialog to get more information.
    • The laptop mode for WinSplit now uses the Up Arrow and Down arrow for maximizing, restoring, and minimizing windows. Combinations of keys (ex: Up and Left) will still result in windows being placed in corners, and the Number Pad keys have not changed as well.
    • If a hotkey only includes the Windows Key (for example, Win Key + Scroll wheel to move a window), the script will now attempt to kill the Windows Menu if it pops up following an action.

Bugs/To Be Improved List (be sure to report your findings!)

  • Not Supported: Applications that "steal" mouse button clicks will interfere with the scripts ability to move a window using the scroll wheel. Adobe documents are an example. Currently there is no known workaround and I won't be working on this unless I, or someone else, gets an idea on how to accomplish this.

Primary Current Features:

#1 - WinSplit Split your monitor(s) into 8 sections and put the active window in a particular section using hotkeys

#2 - WinMove Move windows from Monitor to Monitor easily using the Mouse and/or Keyboard

#3 - WinSpaces Define positions for groups of windows to be recalled at any time from the tray menu

#4 - WinMem Save and Restore Window positions using hotkeys

#5 - WinResize Resize multiple windows that are next to each other at the same time

Reference/Details A lot of the "extra" functions are disabled by default, go into settings to enable them.

WinSplit: Screen Split Hotkeys

Each hotkey is a combination of the windows key (by default, can be changed in GUI) and then a number on the number pad or an arrow key:

Windows Key + Number Pad 0 = minimize the window

Windows Key + Number Pad 1, 3, 7, or 9, OR a combination of Arrow keys (Ex: UP & LEFT) = place the active window into the matching corner of the monitor.

Windows Key + Number Pad 2, 4, 6, 8 = place the active window to half the screen in the direction. Hit the same key again to move it to the next half the screen on the monitor in that direction.

Windows Key + Number Pad 5 = maximize/restore the windows position

Windows Key + Arrow Keys = Left and Right work the same as the equivalent Number Pad keys, but when Laptop mode is on, the Up arrow will Maximize/Restore a window, and the Down arrow will Restore, then minimize a window.

Windows Key + Mouse Click to Maximize = By default this will maximize a window to half of the current monitor, but the location it moves to can be customized in the settings dialog.

Virtual Monitor Definitions = In the settings menu you can have the script Define a certain number of monitors, or set it to "Auto". In auto mode, if the entire desktop Height to Width ratio is below .4, than 2 virtual monitors are defined, if it is below .3, than 3 virtual monitors are defined, and if it is below .2, than 4 virtual monitors are defined.

WinMove: Monitor-to-Monitor Hotkeys

Each hotkey is a combination of Ctrl+windows keys (by default, can be changed in GUI) and then the Arrow Keys, OR the windows key or Middle Click (by default) and the mouse scroll wheel:

CTRL + Windows Key + LEFT, RIGHT, UP, DOWN Arrow Key = Move window (w/out resizing) to the monitor in the direction Specified.

Middle Click + Mouse Scroll = Move window (w/out resizing) to a monitor to the left or right of the current monitor

WinSpaces: Multiple Window Positions Definitions

There are currently no hotkeys for this section as I did not think it would be quite necessary (let me know if you think otherwise!). Go the Tray Menu to create/delete one, and be sure to try the example! If a window cannot be found to be open, SplitMon will attempt to open it for you and then move it.

WinMem: Window Position Memorization

Each hotkey is a combination of the windows keys (by default, can be changed in GUI) and then divide/subtract on the numpad or Home/End:

Windows Key + Number Pad Divide or HOME Key = Save the Current Window Position

Windows Key + Number Pad Minus or END Key = Restore the Current Window Position

WinResize: Multi-Window Resizing

By default, press the CTRL key and then left click on the border of a window that sits next to the border of another window, they will both resize! Many windows can be resized at a time.

CTRL Key + Left Click = Resize Multiple windows at the same time, see video link.

(1637 Downloads since first version)

SplitMon_v3.1.0.zip

Edited by fisofo
Link to comment
Share on other sites

  • Replies 127
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

NOTE: I've also included code for dual monitor systems!

I was looking for a utility like this but it doesn't work with my dual monitor system :P

I have had a look at your code it my guess is that it will only support Dual monitor systems if the second monitor is on the left of the main monitor.

I have also noticed that it doesn't take into account whether the taskbar is visible or not when resizing. Do you have any plans to facilitate this ?

Otherwise the utility is a great idea.

My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
Link to comment
Share on other sites

I was looking for a utility like this but it doesn't work with my dual monitor system :D

I have had a look at your code it my guess is that it will only support Dual monitor systems if the second monitor is on the left of the main monitor.

I have also noticed that it doesn't take into account whether the taskbar is visible or not when resizing. Do you have any plans to facilitate this ?

Otherwise the utility is a great idea.

Thanks for the input! The Dual monitor issue can be taken care of easily enough, althout just so you know, I don't think it will work so well if your monitors are different sizes... I have yet to find a way to get size/position info on individual monitors.

I hadn't noticed the taskbar part, doh! :P That should be pretty easy too... I've gotta split for work, but I'll see if I can bang some of that out later tonight. Thanks for the input!

Link to comment
Share on other sites

I am actually using 2 monitors with different resolutions

I have a 15.14" laptop screen with a res of 1680x1050 and a 19" screen sat on the right hand side of the laptop with a res of 1280 x 1024

As a quick Would it be possible to add an option in the ini file to manually store the position and res of the second monitor

cheers

My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
Link to comment
Share on other sites

I am actually using 2 monitors with different resolutions

I have a 15.14" laptop screen with a res of 1680x1050 and a 19" screen sat on the right hand side of the laptop with a res of 1280 x 1024

As a quick Would it be possible to add an option in the ini file to manually store the position and res of the second monitor

cheers

Definitely a possibility, I'll see if I can add that in!

Link to comment
Share on other sites

Hi Again,

I have managed to find the screen res settings and relative positions in the registry for both monitors.

I used the following guide which may or may not be of any use.

cheers

This is tested in Windows XP. It may work on Windows 2000 and earlier, but there's no guarantees.

Start---->Run--->regedit

Open:

My Computer--->HKEY_CURRENT_CONFIG--->System--->CurrentControlSet--->Control--->VIDEO--->(expand all until

you see 'Monitor')

Locate:

Name Type Data

DefaultSetting.XResolution REG_DWORD 0x00000400 (1024)

DefaultSetting.YResolution REG_DWORD 0x00000300 (768)

Explanation: The data is stored as a hex value. 0x00000400 = 1024(base 10/decimal)

0x00000300 = 768 (base 10/decimal)

To change the default resolution:

1) Alternate-click DefaultSetting.XResolution

2) Click Modify

3) In the window that opens, change the 400 to 320 [which is equal to 800 in base 10]

4) Click ok.

1) Alternate-click DefaultSetting.YResolution

2) Click Modify

3) In the window that opens, change the 300 to 258 [base 10 for 600]

4) Click ok.

Exit Registry Editor and restart your computer.

The default setting should now be 800x600.

Edited by rogdog
My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
Link to comment
Share on other sites

This script is very good. I like it because it is very easy to manipulate windows.

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

mm-mmm, lunch break.

@rogdog - that is fantastic! I'll see what i can do to implement res info...

@RazerM - that means a lot coming from you, thanks!

back to work i go...

Link to comment
Share on other sites

sorry, no update tonight, Bible Study went long. I'll have time tomorrow evening to take a look at this in more detail...

@rogdog - reg entries will be next to impossible i'm afraid, as it appears there can be multiple GUID/PnP or whatever the heck they are... I have no way of telling them apart.

I did find some Dll calls that could be useful here and here, but I'm not sure I'll be able to get them to work or not; my success with Dll's has been not-so-good lately. Perhaps later. (if any of you are feeling ambitious, feel free to show me how to get monitor info using those)

Link to comment
Share on other sites

The only DLL stuff I have found is from a post that you have allready seen

http://www.autoitscript.com/forum/index.php?showtopic=31133

Quite happy to manually configure settings in ini file for now.

I might have a look and see if wmi can be used to extract the info ( if I get chance)

My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
Link to comment
Share on other sites

Thanks for the new version. Working great on my Dual screen system. Definitly a simple but great utility.

My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
Link to comment
Share on other sites

Cool !!

I had tried looking through the WMI but couldn't find the required info. Looks like you got there in the end even though I will not be able to test it until I get back to work on Monday.

To be honest I don't know if you need to add any additional features. I have thought of a couple of things but I wouldn't suggest you took them on board unless you think they are great ideas.

1) One thing I would maybe like is a Windows utility to control the maximise button on a window. On my widescreen laptop it would be handy if the maximise button when first pressed sets a predefined width & height then on the second press of the maximise button the window would fully maximise. I would set the first maximise to use the full height but only 2/3 of the width of the screen (as a lot of windows do not require the full width of a widescreen monitor).

2) Another feature I saw once was a 'snap to window'. This would 'join' the edges of windows together. If you adjusted the size of on window then the adjoining window would also adjust to suit.

Cheers and thanks

My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
Link to comment
Share on other sites

Cool !!

I had tried looking through the WMI but couldn't find the required info. Looks like you got there in the end even though I will not be able to test it until I get back to work on Monday.

To be honest I don't know if you need to add any additional features. I have thought of a couple of things but I wouldn't suggest you took them on board unless you think they are great ideas.

1) One thing I would maybe like is a Windows utility to control the maximise button on a window. On my widescreen laptop it would be handy if the maximise button when first pressed sets a predefined width & height then on the second press of the maximise button the window would fully maximise. I would set the first maximise to use the full height but only 2/3 of the width of the screen (as a lot of windows do not require the full width of a widescreen monitor).

2) Another feature I saw once was a 'snap to window'. This would 'join' the edges of windows together. If you adjusted the size of on window then the adjoining window would also adjust to suit.

Cheers and thanks

Looks like I'll need to adjust the code a bit, the reg keys don't work quite the way I thought, i just did a bit of testing on my work pc... Shouldn't be too bad though, maybe tonight i'll adjust it.

I'd thought of the maximize button idea, we'll see, that may be hard to implement. I do like the "snap window" idea though! Not sure if I can code that, but again, we'll see :)

thanks for the input.

Link to comment
Share on other sites

New versions released, see first post.

And as far as the maximize and resize ideas, I like them, but I don't think I can code it... if anyone gets ideas on how to do it, feel free to post!

Link to comment
Share on other sites

Hi,

I wasn't expecting a new version quite this quick. excelent work :-)

Thanks for adding the resize feature. I have tried the seperate resizer.au3 script you posted which works great but the latest version of splitview bombs out :-(

Look like it fails when detecting my dual screen setup.

I have had a quick look at the code and found that it only detects one device

$ID = PCI\VEN_1002&DEV_4C66&SUBSYS_08600E11&REV_01\4&1BFA44D4&0&0008

in the following bit of code

CODE
; count the number of monitors and

; iterate through each monitor and populate the $results array

$i = 0

for $monitor in $slots

$ID = $monitor.PNPDeviceID

$i += 1

$results[$i]= $ID

ConsoleWrite($ID&@CRLF)

next

To get around this I am using Spliview version 1 and resizer

cheers

My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...