Sign in to follow this  
Followers 0
realkiller

router inet

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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

#3 ·  Posted (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 by th.meger

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0