【发布时间】:2015-08-11 01:20:57
【问题描述】:
这个脚本应该在按键被按下时启动/停止。我希望那是同一个键。示例我按 F3 启动,然后再次按 F3 停止它。它会慢慢地从 0000 数到 9999,并在你停止循环时记住你在哪里。出于某种原因,它会启动,但是当我再次按 F3 时它不会停止。按照这个例子http://www.autohotkey.com/docs/FAQ.htm#repeat 我究竟做错了什么?
#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
【问题讨论】:
标签: autohotkey