Abaddon Posted March 21, 2007 Share Posted March 21, 2007 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. Link to comment Share on other sites More sharing options...
nitekram Posted March 21, 2007 Share Posted March 21, 2007 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. 2¢ 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." 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 Link to comment Share on other sites More sharing options...
_Kurt Posted March 22, 2007 Share Posted March 22, 2007 (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 March 22, 2007 by _Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Abaddon Posted March 23, 2007 Author Share Posted March 23, 2007 Thanks alot, I'm gonna go with the ping as suggested. Works fine Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now