Jump to content

On-line check not always working.


gsb
 Share

Recommended Posts

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!"
Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...