The script itself is a bit simpler then the others for a couple reasons:
1) I did not write or include any other functionality besides window dragging
2) The logic for moving the window is a bit simpler over the other scripts I've seen
3) IMHO, the script is commented and formatted a bit better.
Anyhow, nothing great.
EDIT: Updated to be even simpler thanks to a couple tips posted by Lexikos
;------------------------------------------------- ; Window dragging via alt+lbutton - ; Author: Lasmori (email AT lasmori D0T com) - ;------------------------------------------------- !LButton:: CoordMode, Mouse, Relative MouseGetPos, cur_win_x, cur_win_y, window_id WinGet, window_minmax, MinMax, ahk_id %window_id% ; Return if the window is maximized or minimized if window_minmax <> 0 { return } CoordMode, Mouse, Screen SetWinDelay, 0 loop { ; exit the loop if the left mouse button was released if !GetKeyState("LButton", "P") { break } ; move the window based on cursor position MouseGetPos, cur_x, cur_y WinMove, ahk_id %window_id%,, (cur_x - cur_win_x), (cur_y - cur_win_y) } return ;-------------------------------------------------