Advertisement
DevTricks

Профили на левую клавишу мыши с отключением

Jan 6th, 2022 (edited)
1,350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CoordMode, ToolTip, Screen  ; отображение ToolTip'a относительно рабочего стола.
  2.  
  3. sw = 0
  4. ToolTip, Script Started ,50, 100
  5. SetTimer, RemoveToolTip, -3000
  6. Hotkey, $LButton, Off ; отключение горячей клавиши
  7.  
  8. F1::
  9.   switch sw
  10. {
  11. case "0":
  12.   {
  13.     #Persistent
  14.     ToolTip, Sniper ,50, 100
  15.     SetTimer, RemoveToolTip, -2000
  16.     sw = 1
  17.     Hotkey, $LButton, On ; отключение горячей клавиши
  18.   }
  19. case "1":
  20.   {
  21.     #Persistent
  22.     ToolTip, Shotgun ,50, 100
  23.     SetTimer, RemoveToolTip, -2000
  24.     sw = 2
  25.   }
  26. case "2":
  27.   {
  28.     ToolTip, Script OFF ,50, 100
  29.     SetTimer, RemoveToolTip, -2000
  30.     sw = 0
  31.     Hotkey, $LButton, Off ; отключение горячей клавиши
  32.   }
  33. }
  34. return
  35.  
  36. $LButton::
  37.   if (sw = 1)
  38.   {
  39.     ;ПКМ, ожидание 200мс, ЛКМ
  40.     Click right
  41.     Sleep 200
  42.     Click
  43.   }
  44.   if (sw = 2)
  45.   {
  46.     ;ЛКМ: ожидание 200мс, ПКМ
  47.     Sleep 200
  48.     Click right
  49.   }
  50. Return
  51.  
  52.  
  53. F2:: ExitApp
  54.  
  55. -------------------------------------
  56. RemoveToolTip: ;удаление подсказки
  57.     ToolTip
  58. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement