realkiller 0 Posted July 18, 2006 hi i made a script for my router that it enables internet because my isp is nog that good, the only problem is that it always execute the commands to re enable internet even when i got internet can somone help me plz:D #NoTrayIcon While 1 $acces = "Verbinding maken met 192.168.1.1" $status = "Status - Microsoft Internet Explorer" If Ping("http://www.google.nl") Then Sleep("100") Else Run(@ProgramFilesDir&"\Internet Explorer\iexplore.exe http://192.168.1.1/Status_Router.asp") WinWaitActive($acces) ControlSend($acces, "", "Edit2", "admin") ControlSend($acces, "", "Edit3", "telenet") ControlClick($acces, "", "Button2") WinWaitActive($status) WinSetState($status, "", @SW_MAXIMIZE) EndIf If StatusbarGetText($status, "Gereed")Then MouseClick("left", 469, 757, 100) Else Sleep("100") EndIf Sleep("600000") WEnd Hide realkiller's signature Hide all signatures Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Share this post Link to post Share on other sites
Richard Robertson 186 Posted July 18, 2006 What do you mean? The router and ISP should not directly be related unless you got the router with your connection. Don't use the whole address. Use Ping("google.nl"). Ping communicates with computers, not websites. Http is a protocol. Share this post Link to post Share on other sites
Xenobiologist 44 Posted July 18, 2006 (edited) HI, does this help? #NoTrayIcon $acces = "Verbinding maken met 192.168.1.1" $status = "Status - Microsoft Internet Explorer" While 1 Sleep(10000) check() WEnd Func check() If Ping("www.google.nl") <> 0 Or @error <> 0 Then Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe http://192.168.1.1/Status_Router.asp") WinWaitActive($acces) ControlSend($acces, "", "Edit2", "admin") ControlSend($acces, "", "Edit3", "telenet") ControlClick($acces, "", "Button2") WinWaitActive($status) WinSetState($status, "", @SW_MAXIMIZE) EndIf If StatusbarGetText($status, "Gereed") Then MouseClick("left", 469, 757, 100) Else Sleep(100) EndIf EndFunc ;==>check So long, Mega Edited July 18, 2006 by th.meger Hide Xenobiologist's signature Hide all signatures Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Share this post Link to post Share on other sites
realkiller 0 Posted July 18, 2006 thx all for fast replying iam going to test it @home;) Hide realkiller's signature Hide all signatures Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Share this post Link to post Share on other sites