Jump to content
Sign in to follow this  
infernothebest

Ip refresher

Recommended Posts

infernothebest

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

Share this post


Link to post
Share on other sites
Somerset

#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

 

Spoiler

 

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  

×