Sign in to follow this  
Followers 0
Guest Uwe

Doesn't 'ping' work correctly?

5 posts in this topic

I just want to test if a station responds within a given time.

The following script reports a '1' as roundtrip time.

However a 'ping 123.123.123.123' in a command window

(Windows 2000 SP4) results a 'Destination host not reachable'

(Zielhost nicht erreichtbar).

How can I test if "123.123.123.123" is present or not?

$var = Ping("123.123.123.123",250)

If $var Then

Msgbox(0,"Status","Online, roundtrip was:" & $var)

Else

Msgbox(0,"Status","An error occured with number: " & @error)

EndIf

BTW: Windows without AutoIt is like a car without wheels...

Share this post


Link to post
Share on other sites



Uh i'm new in programming but i think this sentence: If $var Then is wrong cause you don't check what $var has to be or not... Don't blame me if wrong

Share this post


Link to post
Share on other sites

No, the problem is the internal handling.

You can ping this address and the problem is when there is a network message like:

"Answer from X.X.X.X: Destation host unreachable"

So for the command there is an answer so the connection is ok but it isn't.

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