Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Run Not Closing Stream

$
0
0
As part of an application I am writing, I need to find all files matching a criteria on a computer. Based on examples I found, once the Run command is complete, the loop should exit, however I found that the loop would run indefinitely.
I ended up adding some timer logic, to automatically exit the loop if 5 seconds passed.

Does anyone know why my loop will not exit automatically when the Run function finishes?

[ autoit ]      
$StartTime = TimerInit() $Config_File_Path = Run(@ComSpec & " /c dir /s /b application.config", "C:\", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $line = StdoutRead($Config_File_Path) ConsoleWrite($line) If @error <> 0 Then ExitLoop If TimerDiff($StartTime) > 5000 Then ExitLoop Wend

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>