使脚本持续运行在后台,而不会一闪而退
- #Persistent
-
- #Persistent确实是一个非常有用的指令,它可以确保你的AutoHotkey脚本在后台持续运行,特别是在需要定时任务或监控某些窗口时。
- 注意:如果没有加 #Persistent 脚本则无法在托盘中存活。
#Persistent
#SingleInstance Force
SetTimer, passwd, 500
passwd:
if WinExist("打开数据库 - 9_34_31.kdbx")
{
WinActivate ; 激活窗口
Sleep, 100 ; 等待100毫秒以确保窗口激活
Send, 123{Enter} ; 发送密码
}
return
转载请注明出处