jeffharbert icon

Move and Resize Windows with AutoHotKey

jeffharbert | PRO | 02/24/13 03:29:12 PM UTC | 0 ⭐ | 358 πŸ‘οΈ | Never ⏰ | []
Autohotkey |

770 B

|

None

|

0 πŸ‘

/

0 πŸ‘Ž

;This script resizes and moves the current active window
;so that it's 1280 pixels wide and right-aligned on my
;1680 x 1050 monitor
;Brief annotations:
;Set the trigger to Ctrl+Alt+1
!^1::
;Hold down the left Windows key
Send {LWin Down}
;Press the left arrow key
Send {Left}
;Release the left Windows key
Send {LWin Up}
;Sleep for .1 seconds
Sleep 100
;Resize the window to 1280 pixels wide
MouseClickDrag, left, 838, 540, 1278, 540
;Sleep for .1 seconds
Sleep 100
;Move the window 400 pixels to the right
MouseClickDrag, left, 200 , 10, 600, 10
;End the script
Return
Β 
;Script without annotations:
!^1::
Send {LWin Down}
Send {Left}
Send {LWin Up}
Sleep 100
MouseClickDrag, left, 838, 540, 1278, 540
Sleep 100
MouseClickDrag, left, 200 , 10, 600, 10
Return

Comments