Advertisement
DevTricks

Зажатие мышки при нахождении цвета

Feb 27th, 2022
2,380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CoordMode, Pixel, Screen
  2.  
  3. ;PixelGetColor, Color, 959, 539
  4. ;MsgBox, , ,%Color%
  5.  
  6. global FlagD, FlagU ;объявление глобальных переменных
  7.  
  8. F7:: ;запускаем Tools по кругу с минимальной задержкой
  9. FlagD:=false
  10. FlagU:=true
  11. #Persistent
  12. SetTimer, Tools
  13. return
  14.  
  15. F8:: ;Останавливаем таймер
  16. SetTimer, Tools, off
  17. return
  18.  
  19. F2:: Reload
  20. ----------------------------------------------------
  21.  
  22. Tools:
  23. PixelGetColor, co1, 959, 539
  24. If (co1 = 0xC14F4F)
  25. {
  26.     If (FlagD = false)
  27.     {
  28.         SoundBeep, 400, 100
  29.         Send, {LButton Down}
  30.         FlagD:=true
  31.         FlagU:=false
  32.     }
  33. }
  34. else
  35. {
  36.     If (FlagU = false)
  37.     {
  38.         SoundBeep, 350, 100
  39.         Send, {LButton Up}
  40.         FlagU:=true
  41.         FlagD:=false
  42.     }
  43. }
  44.  
  45. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement