This script is suppose to start/stop when a key is pressed. I want that to be the same key. Example I press F3 to start and I press F3 again to stop it. It will slowly count from 0000 to 9999 and will remember where you are when you stop the loop. For some reason it will start but when I press F3 again it doesn't stop. Followed this example http://www.autohotkey.com/docs/FAQ.htm#repeat What am I doing wrong?
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
start = 0000
Run = false
F3::
SetFormat, Float, 04.0
current = %start%
if Run {
Run := false
return
}
Run := true
Loop, 9999{
Send e
Sleep, 760
TrayTip, PinCode BruteForce, %current%, , 16
Send %current%
current += 1.0
start += 1.0
Sleep, 700
if(current = 10000){
Break
}
if (not Run){
Break
}
}
Run := false
return