Sign in to follow this  
Followers 0
gsb

On-line check not always working.

4 posts in this topic

I have a script I adopted from a post here.

It checks to see if a user is connected to the internet, ...well it is supposed to do that.

But some one online with me on MSN kept getting kicked out of the script.

He was on an old NT machine.

$rv = Ping("www.Google.com"); default is 4 seconds
If NOT $rv Then
    MsgBox(262144,"Error","You are not connected to the internet." & @CRLF & "Terminating now.")
    Exit 0
EndIf

I commented out this code and the script worked fine for this person.

Any ideas what I am doing wrong?

gsb


"Did you ever stop to think? ...and forget to restart!"

Share this post


Link to post
Share on other sites



Dial Up?

Bad NIC card?

Fully patched NT machine?

Anything going on in the Event log?

Might try changing the function to do multiple pings before kicking them out. For example, keep a counter of failed ping attempts and only kick them out after you've pinged x times over y seconds. That way you don't get a hung app and you'd be more tolerant of a minor network outage.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Try Ping("google.com"). I used "ping google" as a generic internet test as well. I used the www and it didn't work for me.

Share this post


Link to post
Share on other sites

Good ideas both.

I will try.

As to this user's machine... well I will never know I think.

Thanks,

gsb


"Did you ever stop to think? ...and forget to restart!"

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