Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Declare variables to use in the script
- ; Track your hotkey toggle
- toggle := 0
- ; Set what you want your minimum time to be
- minTime := 512
- ; Set what you want your maximum time to be
- maxTime := 896
- return
- ; Assign a hotkey to toggle your function on and off
- `::
- ; Toggle your variable
- toggle := !toggle
- ; If toggle is on/1/true, start the ClickSub timer
- if (toggle = 1)
- SetTimer, ClickSub, -1
- ; If toggle is off/0/false, turn the ClickSub timer off
- Else
- SetTimer, ClickSub, Off
- return
- ; Block of code you want to run each time
- ClickSub:
- ; Send your click event
- Click
- ; Have AHK generate a random number between your min and max time
- Random, randTime, % minTime, % maxTime
- ; Use the random number to start a new timer
- SetTimer, ClickSub, % -randTime
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement