Sign in to follow this  
Followers 0
Abaddon

Check Internet Connection

4 posts in this topic

I need something to check and see if a dialup internet connection is on. For example, lets say I want it to show a message box saying its on if its on, and one saying its off if its off. Thanks again.

Share this post


Link to post
Share on other sites



I need something to check and see if a dialup internet connection is on. For example, lets say I want it to show a message box saying its on if its on, and one saying its off if its off. Thanks again.

Do a search in the forum for 'internet connection' and I am sure that you will find something you can use.

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

There are two ways to approach this. 1) Ping(..) 2) DllCall

1)

$ping = Ping("www.google.ca")
If $ping > 0 then
    Msgbox(64, "Internet connection active!", "You internet connection is enabled...")
Else 
    Msgbox(16, "Internet connection failure!", "You internet connection is disabled...")
EndIfoÝ÷ Ûf®¶­s`¢b33c´46öãÔFÆÄ6ÆÂgV÷CµväæWBæFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´çFW&æWDvWD6öææV7FVE7FFRgV÷C²ÂgV÷C¶çE÷G"gV÷C²ÃÂgV÷C¶çBgV÷C²Ã¤bb33c´46öå³ÓÓFVà¢×6t&÷ÂgV÷C´äò4ôääT5DôâgV÷C²ÂgV÷CµÆV6R6öææV7BFòFRçFW&æWB&Vf÷&R6öçFçVærgV÷C²¤VÇ6P¢×6v&÷ÂgV÷C´çFW&æWB6öææV7FöâfÇW&Rb333²gV÷C²ÂgV÷Cµ÷RçFW&æWB6öææV7Föâ2F6&ÆVBâââgV÷C²¦VæF

NOTE: Some of these scraps have been taken from various Example Scripts posts.

Kurt

EDIT: I'd also like to point out that Smoke_N does not encourage the dll call, it's not as reliable. See this explanation taken from MSDN

A return value of TRUE from InternetGetConnectedState indicates that at least one connection to the Internet is available. It does not guarantee that a connection to a specific host can be established. Applications should always check for errors returned from API calls that connect to a server. InternetCheckConnection can be called to determine if a connection to a specific destination can be established.

Edited by _Kurt

Awaiting Diablo III..

Share this post


Link to post
Share on other sites

Thanks alot, I'm gonna go with the ping as suggested. Works fine :whistle:

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