Jump to content

Is connected to the internet?


Recommended Posts

; Test for active Internet connection with Ping
Dim $InetActive = Ping("www.google.com")
If Not $InetActive > 0 Then
    MsgBox(4112, "Connection Not Found!", "You must be connected to the Internet" & @CRLF & "to use this program")
    Exit
EndIf

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

And as an added bonus, that particular Ping will also test if your DNS server is working.

-mu

i did it like this

$var = Ping("www.AutoIt-ITS.com", 4000)
If $var Then
    MsgBox(64, "OK", "No Problem    ", 3)
Else
    If @error = 0 Then $problem = "Network Errors Occured " & @error
    If @error = 1 Then $problem = "Host is Off-Line " & @error
    If @error = 2 Then $problem = "Host is Unreachable " & @error
    If @error = 3 Then $problem = "Incorect Destination " & @error
    If @error = 4 Then $problem = "Network Errors Occured " & @error
    MsgBox(64, "Problem", $problem & "  ", 3)
EndIf

8)

NEWHeader1.png

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...