can you make this code instead of closing by hitting f7 and running by hitting f8, make…
- User
can you make this code instead of closing by hitting f7 and running by hitting f8, make it so it is togglable by using f10 (this is an autohotkey script)
F8:: Loop { Loop, 9 { Click down left SendInput, {a down} Sleep, 38000 SendInput, {a up} Sleep, 100 SendInput, {w down} Sleep, 1100 SendInput, {w up} Sleep, 100 SendInput, {d down} Sleep, 38000 SendInput, {d up} SendInput, {w down} Sleep, 1100 SendInput, {w up} Sleep, 100 Click up left } Send, / Sleep, 100 Send, w Sleep, 100 Send, arp garden Send, {Enter} Sleep, 100 } return
F7::ExitApp
- Assistant
Here's the modified code to use F10 as the toggle key:
F10:: Toggle := !Toggle if Toggle { SetTimer, AutoClick, 100 } else { SetTimer, AutoClick, Off } return
AutoClick: Loop, 9 { Click down left SendInput, {a down} Sleep, 38000 SendInput, {a up} Sleep, 100 SendInput, {w down} Sleep, 1100 SendInput, {w up} Sleep, 100 SendInput, {d down} Sleep, 38000 SendInput, {d up} SendInput, {w down} Sleep, 1100 SendInput, {w up} Sleep, 100 Click up left } Send, / Sleep, 100 Send, w Sleep, 100 Send, arp garden Send, {Enter} Sleep, 100 return
F7::ExitApp
Now, pressing F10 will toggle the auto-clicking script on and off.
- User
remove the f7 function
- Assistant
Here's the modified code without the F7 function:
F10:: Toggle := !Toggle if Toggle { SetTimer, AutoClick, 100 } else { SetTimer, AutoClick, Off } return
AutoClick: Loop, 9 { Click down left SendInput, {a down} Sleep, 38000 SendInput, {a up} Sleep, 100 SendInput, {w down} Sleep, 1100 SendInput, {w up} Sleep, 100 SendInput, {d down} Sleep, 38000 SendInput, {d up} SendInput, {w down} Sleep, 1100 SendInput, {w up} Sleep, 100 Click up left } Send, / Sleep, 100 Send, w Sleep, 100 Send, arp garden Send, {Enter} Sleep, 100 return
Now, pressing F10 will toggle the auto-clicking script on and off.