Working on a script that checks IP and then closes notepad2.exe if IP is not equal. Problem is that script closes notepad2.exe regardless.
#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
edit: corrected script so now it doesn't shut down notepad2.exe all the time, but now problem it doesn't update value for vCurrentaddr = %A_IPAddress1%. Now it doesn't close notepad2.exe with:
if (vIPaddress <> vCurrentaddr)