Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OnMessage(0x201, "WM_LBUTTONDOWN")
- ; -----------------------------------------------------------------------------------
- WM_LBUTTONDOWN() {
- CoordMode, mouse, screen
- MouseGetPos, mX, mY
- WinGetPos, wX_Gui1, wY_Gui1,,, Winamp Extra ahk_class AutoHotkeyGUI
- WinGetPos, wX_Gui2, wY_Gui2,,, Winamp_Extra_Background ahk_class AutoHotkeyGUI
- offsetX_Gui1 := mX-wX_Gui1
- offsetY_Gui1 := mY-wY_Gui1
- offsetX_Gui2 := mX-wX_Gui2
- offsetY_Gui2 := mY-wY_Gui2
- owd := A_WinDelay
- SetWinDelay, -1
- SetControlDelay, -1
- While (GetKeyState("LButton", "P")) {
- MouseGetPos, x,y
- WinMove, Winamp Extra ahk_class AutoHotkeyGUI,, x-offsetX_Gui1,y-offsetY_Gui1
- Sleep, 25
- }
- Sleep, 25
- }
- ; -----------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment