tommeke228 Posted May 13, 2008 Share Posted May 13, 2008 (edited) i can't make it working the program must check the ip every min $IP1= "121.128.133." $IP2= "222.111.176." While 1 Sleep(100) ;;;;;;;;;;;;;;;;;$stringTimer = StringIsAlNum($timer2) ;;;;;;;;;;;;;;;;;;;;;If $stringTimer = 1 Then If TimerDiff($timer2) > 1*60*1000 Then $button1() EndIf EndIf WEnd Func dcchecker() While 1 $STRING = "leerer string" $FOO = Run(@ComSpec & " /c netstat -n", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $LINE = StdoutRead($FOO) If @error Then ExitLoop $STRING = $STRING & $LINE WEnd If (StringInStr($STRING, $IP1) <> 0) Or (StringInStr($STRING, $IP2) <> 0) Then $timer = TimerInit() Else While (ProcessExists("sro_client.exe")) Sleep(1000) ProcessClose("sro_client.exe") Sleep(5000) WEnd EndIf EndSwitch WEnd endfunc does somebody see whats wrong ? thx Edited May 13, 2008 by tommeke228 Link to comment Share on other sites More sharing options...
weaponx Posted May 13, 2008 Share Posted May 13, 2008 This is a silly check:$stringTimer = StringIsAlNum($timer2) If $stringTimer = 1 Then If TimerDiff($timer2) > 1*60*1000 ThenThis would allow $timer2 to have alphabet characters in it. Don't even bother with this check. 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