#include <Constants.au3>
Global $acc = iniread("Relog.ini","Global","account","")
Global $pw = iniread("Relog.ini","Global","password","")
Global $path = iniread("Relog.ini","Global","path","")
Global $charslot = iniread("Relog.ini","Global","charslot ","")
While 1
Sleep(5000)
$cmd = "netstat -b"
$string2 = _CMDreturn($cmd)
$result = StringRegExp($string2, "(\[WoW.exe\]\s+TCP)")
If $result = 0 Then
Msgbox(0,"",$result + $string)
WEnd
Func _CMDreturn($sCommand) ; Returns a the output of a DOS command as a string
$cmdreturn = ""
$stream = Run(@ComSpec & " /c " & $sCommand, @SystemDir, @SW_HIDE, $STDOUT_CHILD + $STDIN_CHILD)
While 1 ; loop through the return from the command until there is no more
$line = StdoutRead($stream)
If @error Then ExitLoop
$cmdreturn &= $line
WEnd
Return $cmdreturn
EndFunc ;==>_CMDreturn