Jump to content

Ip refresher


Recommended Posts

i can't make a loop, if the ping fail it must redo the hole procces

#include <Process.au3>
#include <Inet.au3>
#NoTrayIcon
$rc = _RunDos("ipconfig/flushdns")
$rc = _RunDos("ipconfig/release")
$rc = _RunDos("ipconfig/renew")
$PublicIP = _GetIP()
$var = Ping("www.lycos.nl")
If $var Then
MsgBox(0, "Ip vernieuwer", "Ip Zoeken...", 2)
MsgBox(0, "IP Address", "Uw IP adres is: " & $PublicIP)
Else
Here must come the loop other wise i dont know how to do it!!!!!!!!!!!!!
EndIf
Link to comment
Share on other sites

#include <Process.au3>
#include <Inet.au3>
#NoTrayIcon
while 1
$rc = _RunDos("ipconfig/flushdns")
$rc = _RunDos("ipconfig/release")
$rc = _RunDos("ipconfig/renew")
$PublicIP = _GetIP()
$var = Ping("www.lycos.nl")
If $var Then
MsgBox(0, "Ip vernieuwer", "Ip Zoeken...", 2)
MsgBox(0, "IP Address", "Uw IP adres is: " & $PublicIP)
exit 
Else
;do nothing restart
EndIf
wend

will this do?

Edited by beerman
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...