I'd like to write a script to organize the windows I currently have open on my screen.
Ex: Move all browsers to monitor 1 and everything else to monitor 2 Ex: Make the 4 maximized windows on monitor 1 each take up equal sized quadrants on the screen etc..
I assume VBScript would be good for this? What Objects would I use for this in a Win7 environment?
This isn't possible in VBScript out-of-the-box, because it doesn't provide access to Windows APIs used for window management.
AutoIt seems a better tool for the job. Look into the following functions and macros:
WinMove
- move windows_WinAPI_GetSystemMetrics
(80)
- get the number of monitors@DesktopWidth
and @DesktopHeight
- primary monitor pixel size_WinAPI_GetSystemMetrics(78)
and _WinAPI_GetSystemMetrics(79)
- full desktop width and heigthIf the monitor dimensions are different, you can use the WMI class Win32_DesktopMonitor
and its ScreenWidth
and ScreenHeigth
properties to get individual monitor dimensions.