Aight ill see if I can find another.
Heres one more advanced
Heres one more advanced
Code:
HotKeySet("{end}", "ExitBot")
Func ExitBot()
For $i = 1 to 3
KillProcesses()
Next
Exit
EndFunc
LogIp("==========================")
$StartIp = GetIp()
LogIp("Actual IP = " & $StartIp)
run("C:\program files\internet explorer\IEXPLORE.EXE http://192.168.1.1/adslok.cgi?enblInternet=1", "C:\program files\internet explorer")
WinWait("Connect to 192.168.1.1", "", 10)
ControlClick ("Connect to 192.168.1.1", "", 1)
Sleep (90000)
KillProcesses()
Exit
Func GetIp()
Do
SplashTextOn ( "", "... WAITING FOR NEW IP ...", 300, 20, 60, 20, 1, "" , "" , "" )
$GotIp = URLDownloadToFile("http://checkip.dyndns.org/", "temp")
until $GotIp = 1
$IpFile = FileOpen ("temp",0)
$Ip = FileReadLine ($IpFile, 1)
$Ip = StringReplace ($Ip, "<html><head><title>Current IP Check</title></head><body>Current IP Address: ", "")
$Ip = StringReplace ($Ip, "</body></html>", "")
SplashTextOn ( "", "CURRENT IP : " & $Ip & " ", 300, 20, 60, 20, 1, "" , "" , "" )
FileClose ($IpFile)
FileDelete ("temp")
Return $Ip
EndFunc
Func KillProcesses()
For $i = 1 to 3
ProcessClose("iexplore.exe")
Next
EndFunc
Func LogIp($String)
$LogFile = FileOpen (@SCRIPTDIR & "\LogIp.txt", 1)
FileWriteLine ($LogFile, @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & "> " & $String)
FileClose ($LogFile)
EndFunc
![[Image: Snipz.png]](http://www.l33tsig.net/sig/Snipz.png)