Guest User

Untitled

a guest
Oct 21st, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4.  
  5.  
  6.  
  7.  
  8. Gui, Add, Tab, x2 y-1 w297 h225 , About|AutoLB|
  9. Gui, Tab, About
  10. Gui, Font, S15 CDefault, Comic Sans MS Bold
  11. Gui, Add, Text, x65 y70 w700 h70 , Auto Clicker
  12. Gui, Font, S15 CDefault, Comic Sans MS Bold
  13. Gui, Add, Text, x65 y110 w200 h40 , Made by Grzegorz
  14. Gui, Font, S10 CDefault, Comic Sans MS Bold
  15. Gui, Add, Text, x5 y205 w210 h17 , Version: 1.0
  16.  
  17. Gui, Tab, AutoLB ; Auto left button tab
  18. Gui, Add, Text,, Minimum CPS
  19. Gui, Add, Slider, vMin gMin ToolTip Range0-100, 10
  20. Gui, Add, Text,, Maximum CPS
  21. Gui, Add, Slider, vMax gMax ToolTip Range0-100, 17
  22. Gui, Add, Hotkey, vHK gLabel
  23. Gui, Add, CheckBox, vCB x+5, Win
  24. Gui, Show,,Dynamic Hotkeys
  25.  
  26. Gui, Show, x50 y50 h225 w300, Auto Clicker by Grzegorz
  27. Gui, Submit, NoHide
  28. Return
  29.  
  30. Label:
  31. If HK in +,^,!,+^,+!,^!,+^! ;If the hotkey contains only modifiers, return to wait for a key.
  32. return
  33. If (savedHK) { ;If a hotkey was already saved...
  34. Hotkey, %savedHK%, Label1, Off ; turn the old hotkey off
  35. savedHK .= " OFF" ; add the word 'OFF' to display in a message.
  36. }
  37. Gui, Submit, NoHide
  38. If CB ;If the 'Win' box is checked, then add its modifier (#).
  39. HK := "#" HK
  40. If StrLen(HK) = 1 ;If the new hotkey is only 1 character, then add the (~) modifier.
  41. HK := "~" HK ; This prevents any key from being blocked.
  42. Hotkey, %HK%, Label1, On ;Turn on the new hotkey.
  43. savedHK := HK ;Save the hotkey for future reference.
  44. return
  45.  
  46. ;This label may contain any commands for its hotkey to perform.
  47. Label1:
  48. MsgBox,% A_ThisLabel "`n" A_ThisHotkey
  49. return
  50.  
  51.  
  52. Min:
  53. {
  54. Gui, Submit, NoHide
  55. }
  56. return
  57.  
  58. Max:
  59. {
  60. Gui, Submit, NoHide
  61. }
  62. return
  63.  
  64.  
  65. ;Autoclicker
  66. Hotkey,savedHK, *LButton, Toggle
  67. *LButton::
  68. Send,{LButton}
  69. While GetKeyState("LButton", "P")
  70. {
  71. Send,{LButton}
  72. Random, delay, %Min%, %Max%
  73. Sleep %delay%
  74. }
  75. return
  76.  
  77.  
  78.  
  79. GuiClose:
  80. ExitApp
Add Comment
Please, Sign In to add comment