sebsabul Posted March 29, 2005 Posted March 29, 2005 Hey Guys I need some help (Sorry for bad English) This is my source: $var = Ping("192.168.0.2",4000) If $var Then Msgbox(0,"Status","Online") Do $var Until ----------------------------------->here is my problem EndIf Msgbox(0,"Status","Offline") The loop should stop, when the ping isn´t successful. (Wait for offline of the host and then print: Status:Offline ) How? Thank you for answers.
sebsabul Posted March 29, 2005 Author Posted March 29, 2005 (edited) Here is it: sleep(20000) $var = Ping("www.hiddensoft.com",4000) If @error = 0 Then Msgbox(0,"Status","Online") Do Ping("www.hiddensoft.com",4000) Until @error <> 0 Msgbox(0,"Status","Offline") While 1 = 1 Do Ping("www.hiddensoft.com",4000) Until @error = 0 Msgbox(0,"Status","Online") Do Ping("www.hiddensoft.com",4000) Until @error <> 0 Msgbox(0,"Status","Offline") Wend Else Msgbox(0,"Status","Offline") Do Ping("www.hiddensoft.com",4000) Until @error = 0 Msgbox(0,"Status","Online") While 1 = 1 Do Ping("www.hiddensoft.com",4000) Until @error <> 0 Msgbox(0,"Status","Offline") Do Ping("www.hiddensoft.com",4000) Until @error = 0 Msgbox(0,"Status","Online") Wend EndIf Edited March 29, 2005 by sebsabul
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now