Guest User

Untitled

a guest
Apr 10th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. OnMessage(0x201, "WM_LBUTTONDOWN")
  3.  
  4. ; -----------------------------------------------------------------------------------
  5. WM_LBUTTONDOWN() {
  6.     CoordMode, mouse, screen
  7.     MouseGetPos, mX, mY
  8.     WinGetPos, wX_Gui1, wY_Gui1,,, Winamp Extra ahk_class AutoHotkeyGUI
  9.     WinGetPos, wX_Gui2, wY_Gui2,,, Winamp_Extra_Background ahk_class AutoHotkeyGUI
  10.     offsetX_Gui1 := mX-wX_Gui1
  11.     offsetY_Gui1 := mY-wY_Gui1
  12.     offsetX_Gui2 := mX-wX_Gui2
  13.     offsetY_Gui2 := mY-wY_Gui2
  14.     owd := A_WinDelay
  15.     SetWinDelay, -1
  16.     SetControlDelay, -1
  17.     While (GetKeyState("LButton", "P")) {
  18.         MouseGetPos, x,y
  19.         WinMove, Winamp Extra ahk_class AutoHotkeyGUI,, x-offsetX_Gui1,y-offsetY_Gui1
  20.         Sleep, 25
  21.     }
  22.     Sleep, 25
  23. }
  24. ; -----------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment