Jump to content

Program locking up my machine


 Share

Recommended Posts

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.

CODE
case $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

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.

CODE
case $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

Maybe this will help

While 1

$linepingn = stdoutread($pingn)

if @error= -1 then ExitLoop

if $linepingn <> '' then

GUICtrlSetData($GUIEdit, $linepingn, 1)

else

sleep(50)

endif

WEnd

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...