mazwoz Posted August 20, 2007 Share Posted August 20, 2007 I am having an issue when i try to run my program. It locks up weather or not i run it from au3 or compile it first. the only part that is locking up the computer (using 99% of the processor) is the ping -n the coding is below if anyone could tell me why this is messing up i would really appreciate it. CODEcase $ping3 $var = InputBox("Number of Pings", "Input the number of pings here:","15") $pingn = run(@ComSpec & " /c ping " & $ip & " -n " & $var, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $linepingn = stdoutread($pingn) if @error= -1 then ExitLoop GUICtrlSetData($GUIEdit, $linepingn, 1) WEnd while 1 $line = StderrRead($linepingn) if @error = -1 then ExitLoop MsgBox(0, "ERROR:", $LINE) WEnd Link to comment Share on other sites More sharing options...
martin Posted August 20, 2007 Share Posted August 20, 2007 I am having an issue when i try to run my program. It locks up weather or not i run it from au3 or compile it first. the only part that is locking up the computer (using 99% of the processor) is the ping -n the coding is below if anyone could tell me why this is messing up i would really appreciate it. CODEcase $ping3$var = InputBox("Number of Pings", "Input the number of pings here:","15") $pingn = run(@ComSpec & " /c ping " & $ip & " -n " & $var, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)While 1$linepingn = stdoutread($pingn)if @error= -1 then ExitLoopGUICtrlSetData($GUIEdit, $linepingn, 1)WEndwhile 1 $line = StderrRead($linepingn)if @error = -1 then ExitLoopMsgBox(0, "ERROR:", $LINE)WEndMaybe this will helpWhile 1$linepingn = stdoutread($pingn)if @error= -1 then ExitLoopif $linepingn <> '' then GUICtrlSetData($GUIEdit, $linepingn, 1)else sleep(50)endifWEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Zedna Posted August 20, 2007 Share Posted August 20, 2007 ... While 1 $linepingn = stdoutread($pingn) if @error= -1 then ExitLoop GUICtrlSetData($GUIEdit, $linepingn, 1) Sleep(10) WEnd ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mazwoz Posted August 22, 2007 Author Share Posted August 22, 2007 thanks for your help guys but i realized last night that i had put the wrong variable name in my stderrread thanks again 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