Implementation of different useful actions for handling windows in general and within a multi-monitor setup in special.
Functions starting with the prefix WPXA are designed to be used as user-actions within WindowPadX, whereas functions starting with the prefix wp are internal helper functions.
hoppfrosch
WTFPL (http://sam.zoy.org/wtfpl/)
Lexikos | for his great work and his Original WindowPad - multi-monitor window-moving tool (http://www.autohotkey.com/forum/topic21703.html) |
ShinyWong | for his GetMonitorIndexFromWindow function (http://www.autohotkey.com |
Skrommel | for his MouseMark function (http://www.donationcoder.com |
x97animal | for his clipCursor Function (http://www.autohotkey.com |
ipstone today | for his initial implementation (http://www.autohotkey.com |
Sean | for his WinTrayMin functionality (http://http: |
gwarble | for his great Notify function (http://www.autohotkey.com |
0.2.0 | [-] Removed <wp_RollWindow> [-] Removed <wp_UnrollWindow> [+] wp_RollWindowToggle: Toggles Roll/Unroll State of window. (Corrected behaviour after manually resizing a previously rolled window) [*] Adapted WPXA_RollToggle to use wp_RollWindowToggle |
0.1.12 | [*] Internal Changes: Update to Notify 0.499 (http://www.autohotkey.com |
0.1.11 | [+] wp_WinTraymin : Minimize a window to a tray icon (see: http://http: |
0.1.10 | [+] wp_GetMonitorFromMouse: Determines monitor from current mouseposition. [*] WPXA_MinimizeWindowsOnMonitor: added minimization of all windows on screen where mouse is. |
0.1.9 | [+] WPXA_TileLast2Windows: Tile active and last window (see: http://www.autohotkey.com |
0.1.8 | [*] WPXA_MaximizeToggle: Bugfix to actually toggle Maximization (see: http://www.autohotkey.com |
0.1.7 | [+] WPXA_RollToggle: Toggles Roll/Unroll State of window. [+] <wp_RollWindow>: Rolls up a window to its titlebar. [+] <wp_UnRollWindow>: Unrolls a previously rolled up window (restores original height). |
0.1.6 | [*] WPXA_TopToggle: Reanimated Notification (removed Parameter ShowNotification). [*] Extended Debug-Logging via OutputDebug. (Unified Output format, Created posibillity to remove debug information (via Tag DBG)). |
0.1.5 | [-] WPXA_MouseLocator: Using integer coordinates for Gui Show. |
WindowPadX-Actions library | Implementation of different useful actions for handling windows in general and within a multi-monitor setup in special. |
Functions | |
WPXA_version | Returns the current version of WPXA |
wp_ClipCursor | Clips (restricts/confines) the mouse to a given area |
wp_GetMonitorAt | Get the index of the monitor containing the specified x and y coordinates. |
wp_GetMonitorFromMouse | Get the index of the monitor where the mouse is |
wp_GetMonitorFromWindow | Get the index of the monitor containing the specified window. |
wp_GetProp | Get window property. |
wp_IsAlwaysOnTop | Determine whether fiven window is set to always on top |
wp_IsResizable | Determine if we should attempt to resize the last found window. |
wp_IsWhereWePutIt | Restores windows position and size previously stored with wp_RememberPos |
wp_RememberPos | Helper function for detection of window movement by user. |
wp_RemoveProp | Remove window property. |
wp_Restore | Restores windows to state according properties |
wp_RollWindowToggle | Toggles Rollup of a window (Rollup to caption bar) |
wp_SetProp | Set window property. |
wp_SetRestorePos | Stores windows position for restoring it later |
wp_WinExist | Custom WinExist() for implementing a couple extra “special” values. |
wp_WinGetTitle | Custom WinGetTitle() for getting either title of “last found” window or window given by title |
wp_WinLastMinimized | Get most recently minimized window. |
wp_WinPreviouslyActive | Get next window beneath the active one in the z-order. |
wp_WinTraymin | Minimizes a window to a tray icon. |
WPXA_ClipCursorToMonitor | Clips (Restricts) mouse to given monitor |
WPXA_ClipCursorToCurrentMonitorToggle | Toogles clipping mouse to current monitor |
WPXA_FillVirtualScreen | Expand the window to fill the virtual screen (all monitors). |
WPXA_GatherWindowsOnMonitor | “Gather” windows on a specific screen. |
WPXA_MaximizeToggle | Maximize or restore the window. |
WPXA_MinimizeWindowsOnMonitor | Minimize all windows on the given Screen or all windows on screen where where the mouse currently lives |
WPXA_Move | move and resize window based on a “pad” concept. |
WPXA_MoveMouseToMonitor | Moves mouse to center of given monitor |
WPXA_MoveWindowToMonitor | Move window between screens, preserving relative position and size. |
WPXA_MouseLocator | Easy find the mouse |
WPXA_RollToggle | Toogles “Roll/Unroll” for given window |
WPXA_TileLast2Windows | Tile active and last window |
WPXA_TopToggle | Toogles “Always On Top” for given window |
WPXA_TrayMinWindow | Minimizes a window to a tray icon. |
WPXA_version()
Returns the current version of WPXA
Versioning scheme according to http://semver.org
current version number of the module
20110713 | hoppfrosch - Original |
wp_ClipCursor( Confine = True, x1 = 0 , y1 = 0, x2 = 1, y2 = 1 )
Clips (restricts/confines) the mouse to a given area
Confine | Toogle for Clipping |
x1,y1,x2,y2 | Bounding coordinates (upper left, lower right) of confined area |
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.
Original | x79animal - http://www.autohotkey.com |
20110127 | hoppfrosch - Modifications |
wp_GetMonitorAt( x, y, default = 1 )
Get the index of the monitor containing the specified x and y coordinates.
x,y | Coordinates |
default | Default monitor |
Index of the monitor at specified coordinates
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_GetMonitorFromWindow( hWnd )
Get the index of the monitor containing the specified window.
hWnd | Window handle |
Index of the monitor of specified window
Original | ShinyWong - http://www.autohotkey.com |
wp_GetProp( hwnd, property_name, type = "int" )
Get window property.
hwnd | Window handle |
property_name | Name of the property |
type | Type of the property - should be int, uint or float. |
Value of the property, otherwise NULL if property does not exist
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
Reference | MSDN - http://msdn.microsoft.com |
wp_IsResizable()
Determine if we should attempt to resize the last found window.
True or False
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_IsWhereWePutIt( hwnd, x, y, w, h )
Restores windows position and size previously stored with wp_RememberPos
hwnd | Window handle |
x,y,w,h | last position and size |
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_RememberPos( hwnd )
Helper function for detection of window movement by user. Stores the current position. The stored position can be recovered by wp_IsWhereWePutIt
hwnd | Window handle |
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_RemoveProp( hwnd, property_name )
Remove window property.
hwnd | Window handle |
property_name | Name of the property |
Handle | The return value identifies the specified data. If the data cannot be found in the specified property list, the return value is NULL. |
Reference | MSDN (http://msdn.microsoft.com |
20110713 | hoppfrosch - AutoHotkey-Implementation |
wp_SetProp( hwnd, property_name, data, type = "int" )
Set window property.
hwnd | Window handle |
property_name | Name of the property |
data | Value of the property |
type | Type of the property - should be int, uint or float |
True or False
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_SetRestorePos( hwnd, x, y, w, h )
Stores windows position for restoring it later
hwnd | Window handle |
x,y,w,h | Next time user requests the window be “restored” use this position and size. |
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_WinExist( WinTitle )
Custom WinExist() for implementing a couple extra “special” values.
WinTitle | Title of the window |
Windowshandle
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_WinLastMinimized()
Get most recently minimized window.
True or false
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_WinPreviouslyActive()
Get next window beneath the active one in the z-order.
Windowshandle
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
wp_WinTraymin( hWnd = "", nFlags = "" )
Minimizes a window to a tray icon.
hWnd | Windows-Handle |
nFlags | Flag to allow manipulate properites: wp_WinTraymin(hWnd,0), where 0 can be omitted. Removing all trayminned trayicons: wp_WinTraymin(0,-1). Other values than 0 & -1 are reserved for internal use. |
Original | Sean - http://http: |
WPXA_FillVirtualScreen( winTitle )
Expand the window to fill the virtual screen (all monitors).
winTitle | windows title |
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
WPXA_GatherWindowsOnMonitor( md )
”Gather” windows on a specific screen.
md | monitor id |
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
WPXA_MaximizeToggle( winTitle )
Maximize or restore the window.
winTitle | windows title |
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
WPXA_MinimizeWindowsOnMonitor( md )
Minimize all windows on the given Screen or all windows on screen where where the mouse currently lives
md | monitor-id, if 0 determine monitor from mouse pos |
20110125 | hoppfrosch - Initial |
20120322 | hoppfrosch - minimize windows on screen where mouse is (md = 0) |
WPXA_Move( sideX, sideY, widthFactor, heightFactor, winTitle )
move and resize window based on a “pad” concept.
sideX, sideY, widthFactor, heightFactor | **TODO** |
winTitle | windows title (“A” - Active Window, “P” - Previous Window) |
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
WPXA_MoveWindowToMonitor( md, winTitle )
Move window between screens, preserving relative position and size.
md | Monitor id |
winTitle | windows title |
Original | Lexikos - http://www.autohotkey.com/forum/topic21703.html |
WPXA_MouseLocator()
Easy find the mouse
Windings-Font
Original | Skrommel - http://www.donationcoder.com |
20110127 | hoppfrosch - Modifications |
WPXA_TileLast2Windows()
Tile active and last window
20120316 | ipstone today - Initial (http://www.autohotkey.com |
Returns the current version of WPXA
WPXA_version()
Clips (restricts/confines) the mouse to a given area
wp_ClipCursor( Confine = True, x1 = 0 , y1 = 0, x2 = 1, y2 = 1 )
Get the index of the monitor containing the specified x and y coordinates.
wp_GetMonitorAt( x, y, default = 1 )
Get the index of the monitor where the mouse is
wp_GetMonitorFromMouse( default = 1 )
Get the index of the monitor containing the specified window.
wp_GetMonitorFromWindow( hWnd )
Get window property.
wp_GetProp( hwnd, property_name, type = "int" )
Determine whether fiven window is set to always on top
wp_IsAlwaysOnTop( WinTitle, IsSetByWP = )
Determine if we should attempt to resize the last found window.
wp_IsResizable()
Restores windows position and size previously stored with wp_RememberPos
wp_IsWhereWePutIt( hwnd, x, y, w, h )
Helper function for detection of window movement by user.
wp_RememberPos( hwnd )
Remove window property.
wp_RemoveProp( hwnd, property_name )
Restores windows to state according properties
wp_Restore()
Toggles Rollup of a window (Rollup to caption bar)
wp_RollWindowToggle( hwnd )
Set window property.
wp_SetProp( hwnd, property_name, data, type = "int" )
Stores windows position for restoring it later
wp_SetRestorePos( hwnd, x, y, w, h )
Custom WinExist() for implementing a couple extra “special” values.
wp_WinExist( WinTitle )
Custom WinGetTitle() for getting either title of “last found” window or window given by title
wp_WinGetTitle( WinTitle )
Get most recently minimized window.
wp_WinLastMinimized()
Get next window beneath the active one in the z-order.
wp_WinPreviouslyActive()
Minimizes a window to a tray icon.
wp_WinTraymin( hWnd = "", nFlags = "" )
Clips (Restricts) mouse to given monitor
WPXA_ClipCursorToMonitor( md )
Toogles clipping mouse to current monitor
WPXA_ClipCursorToCurrentMonitorToggle()
Expand the window to fill the virtual screen (all monitors).
WPXA_FillVirtualScreen( winTitle )
“Gather” windows on a specific screen.
WPXA_GatherWindowsOnMonitor( md )
Maximize or restore the window.
WPXA_MaximizeToggle( winTitle )
Minimize all windows on the given Screen or all windows on screen where where the mouse currently lives
WPXA_MinimizeWindowsOnMonitor( md )
move and resize window based on a “pad” concept.
WPXA_Move( sideX, sideY, widthFactor, heightFactor, winTitle )
Moves mouse to center of given monitor
WPXA_MoveMouseToMonitor( md )
Move window between screens, preserving relative position and size.
WPXA_MoveWindowToMonitor( md, winTitle )
Easy find the mouse
WPXA_MouseLocator()
Toogles “Roll/Unroll” for given window
WPXA_RollToggle( WinTitle )
Tile active and last window
WPXA_TileLast2Windows()
Toogles “Always On Top” for given window
WPXA_TopToggle( WinTitle )
Minimizes a window to a tray icon.
WPXA_TrayMinWindow( WinTitle )