Advertisement
CivReborn

AutoHotKey Commands Tutorial #2: MouseGetPos

Jan 29th, 2017
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. ;AutoHotKey Commands Tutorial #2: MouseGetPos
  2. ;Written By: CivReborn
  3. ;YouTube Page: https://www.youtube.com/channel/UCge0TKjySLXd8xeLib8F0rA
  4. ;Date: Jan 29th, 2017
  5. ;MouseGetPos, [OutputVarX, OutputVarY, OutputVarWin, OutputVarControl, 1|2|3]
  6. #SingleInstance, Force
  7. CoordMode, Mouse, Screen
  8. Gui, Font, cAqua
  9. Gui, Add, Text, x10 y10,X =
  10. Gui, Add, Edit,cBlack x+10 w100 h15
  11. Gui, Add, Text, x+10,Y =
  12. Gui, Add, Edit,cBlack x+10 w100 h15
  13. Gui, Add, Text, x10, Window ID:
  14. Gui, Add, Edit,cBlack x+10 w220 h15
  15. Gui, Add, Text, x10, Control ID:
  16. Gui, Add, Edit,cBlack x+10 w220 h15
  17. Gui, Add, Button,x10 y75 w135 h20 gGet_INFO,GET INFO
  18. Gui, Add, Button,x+10 y75 w135 h20 gMouse_Move,Mouse Move
  19. Gui, Color, Black
  20. Gui, +AlwaysOnTop
  21. Gui, Show, w300 h100, MouseGetPos
  22. return
  23. GuiClose:
  24. ExitApp
  25. Get_INFO:
  26. i := 0
  27. Loop
  28. {
  29. Left_Mouse := GetKeyState("LButton")
  30. if(Left_Mouse==False&&i==0
  31. i := 1
  32. if(Left_Mouse==True&&i==1)
  33. {
  34.  
  35. break
  36. }
  37. }
  38. ;GuiControl,,**,%%
  39. ;GuiControl,,**,%%
  40. ;GuiControl,,**,%%
  41. ;GuiControl,,**,%%
  42. return
  43. Mouse_Move:
  44. return
  45. ^NumPad0::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement