Jump to content

Search the Community

Showing results for tags 'is internet connected'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. EDIT: Warning... Brewman said it the best: "Your last script will only tell you if your computer is connected to a network, it won't tell you if your network is connected to the internet." This was proven when my internet connection went out before I even got that warning and the script all to happily announced that I was connected. Oh well... back to the drawing board. And this time I plan to test it during the night when I can reset my router whenever I need as a fair test of what happens during an outage. For now, it may still be of some use to others. I will leave the script below in tact even once the other version is completed because you never know. One mans trash and all that... This is in general help and support as well, but I thought that it wouldnt hurt to post it here too. There are plenty of reasons to check for an active connection, and this is a pretty different way of getting it done. While 1 $connect = _GetNetworkConnect() If $connect Then MsgBox(64, "YES!!!", $connect) Exit Else Sleep( 3000 ) EndIf WEnd Func _GetNetworkConnect() Local Const $NETWORK_ALIVE_LAN = 0x1 ;net card connection Local Const $NETWORK_ALIVE_WAN = 0x2 ;RAS (internet) connection Local Const $NETWORK_ALIVE_AOL = 0x4 ;AOL Local $aRet, $iResult $aRet = DllCall("sensapi.dll", "int", "IsNetworkAlive", "int*", 0) If BitAND($aRet[1], $NETWORK_ALIVE_LAN) Then $iResult &= "LAN connected" & @LF If BitAND($aRet[1], $NETWORK_ALIVE_WAN) Then $iResult &= "WAN connected" & @LF If BitAND($aRet[1], $NETWORK_ALIVE_AOL) Then $iResult &= "AOL connected" & @LF Return $iResult EndFunc And of course, I will give credit where it is due. I may have modified this code to my needs, but most of it belongs to rasim, and the original solution can be found here. I truly hope that someone finds some use for this.
×
×
  • Create New...