Advertisement
DevTricks

Координаты мыши и отклонение

Oct 6th, 2021
1,353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. xpos0:=0
  2. ypos0:=0
  3.  
  4. #Persistent
  5. SetTimer, ToolTipShow, 20
  6. return
  7.  
  8. F1:: ; По F1 задаём начальную точку отсчёта
  9.     CoordMode, Mouse, Screen
  10.     MouseGetPos, xpos0, ypos0
  11. return
  12.  
  13. F2::ExitApp
  14. F3::Reload
  15.  
  16. ToolTipShow:
  17.    CoordMode, Mouse, Screen
  18.     MouseGetPos, xpos, ypos
  19.     CoordMode, Pixel, Screen
  20.     CoordMode, ToolTip, Screen  
  21.     xpos1:=xpos0-xpos
  22.     ypos1:=ypos0-ypos
  23.     ToolTip, Координаты   X: %xpos% Y: %ypos%`nОтклолнение X: %xpos1% Y: %ypos1%
  24.     Sleep 10
  25. return
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement