[FUNC]获取网络连接状态

 

 

Address = "smtp.qq.com"
wmi := ComObjGet("winmgmts:")
queryEnum := wmi.ExecQuery(""
        . "Select * from Win32_PingStatus where Address=" . Address)
        ._NewEnum()
if queryEnum[process] && process.ResponseTime
    MsgBox connection success
else
    MsgBox connection fail
wmi := queryEnum := process := ""
return

 

你可能感兴趣的:(AutoHotkey,AHK,AutoHotkey,AHK)