Last active
December 24, 2015 01:29
-
-
Save TLMcode/6724077 to your computer and use it in GitHub Desktop.
Detect Network Connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loop { | |
For Item in (ComObjGet("winmgmts:").ExecQuery("Select * from Win32_NetworkAdapter"),l:="") | |
l.=Item.NetEnabled | |
If !InStr(l,-1) | |
TrayTip,, Network Disconnected! | |
} | |
ESC::ExitApp ; <-- Press escape to exit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment