Jump to content
Sign in to follow this  
sebsabul

Ping

Recommended Posts

sebsabul

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.

Share this post


Link to post
Share on other sites
sebsabul

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 by sebsabul

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  

×