【发布时间】:2014-12-22 08:27:40
【问题描述】:
使用检查 IP 的脚本,如果 IP 不相等则关闭 notepad2.exe。问题是脚本无论如何都会关闭 notepad2.exe。
#SingleInstance
#Persistent
Settimer, CheckIP, 500
vIPaddress = "192.168.1.14"
CheckIP:
vCurrentaddr = %A_IPAddress1%
if (vIPaddress <> vCurrentaddr)
{
Process, Close, Notepad2.exe
}
return
f10::exitapp ; when I need to stop watchdog
编辑: 更正了脚本,所以现在它不会一直关闭 notepad2.exe,但现在问题是它不会更新 vCurrentaddr = %A_IPAddress1% 的值。现在它不会关闭notepad2.exe:
if (vIPaddress vCurrentaddr)
【问题讨论】:
标签: autohotkey