Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Of course. However, you should probably consider an appropriate exit code instead of a message string to signify that loading isn't complete yet. Unless the output is never localized there.</p> <p>Anyway, here we go:</p> <pre><code>:loop yourcommand.exe | findstr MAGIC STRING SIGNIFYING LOADING NOT YET COMPLETE &gt;nul 2&gt;&amp;1 if not errorlevel 1 goto loop </code></pre> <p>This simply retries as long as the <code>findstr</code> there returns <code>0</code> as its exit code (meaning it found the string).</p> <p>Two problems with this, though:</p> <ol> <li><p>It's a resource hog. You should put a sleep in there to try every other second or so instead of doing it continuously:</p> <pre><code>ping -n 1 ::1 &gt;nul 2&gt;&amp;1 </code></pre></li> <li><p>While this will run your intended command at most once (in the end), it eats all output since it pipes it to <code>findstr</code>. Unless you have <code>tee</code> at hand that's difficult to resolve (it would involve a <code>for</code> loop over the output and checking each line with <code>findstr</code> – you don't want to go there, believe me.</p> <p>An option might be if there was a way for your command to just check and then issue the actual commands with a call after the loop (which exists when the program was found to be working). You could then happily log all output. However, if the program you're talking to goes down between exiting the loop and launching the program with the actual commands you got another problem.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload