mIRC Homepage
Posted By: keeker External Commands - 03/08/06 10:59 PM
Is there a way for mirc to wait for external commands to finish before it moves on to the next part of a script?

Lets say i want to trace an address using tracert
//run -n cmd /C tracert yahoo.com > trace.txt

since i dont know how long to wait, i was wondering if there was a snippet around that would let me catch the data after the command finishes.

hope this makes sense

Posted By: keeker Re: External Commands - 03/08/06 11:37 PM
NEVER MIND.....i found it on an old question i asked years ago
Posted By: Taggnostr Re: External Commands - 04/08/06 05:30 AM
i had the same problem, but the only things that you can do (i think) is to check the file after n second using a timer, and do it again until the file is changed (or created)
you can do a /timerx 0 n $read/$exists that check the file every n second and stop it using /timerx off, or restart a new /timer 1 n $read/$exists every time that you check the file and it doesn't exists
Posted By: KingTomato Re: External Commands - 04/08/06 05:35 PM
There is a snipplet made by Online to run and wait. It's available on these forums, and mircscripts.org as well (Link here).
Posted By: keeker Re: External Commands - 04/08/06 08:05 PM
TY TY TY TY TY kingtomatoe, that is the one i was trying to remember! whooohooo
© mIRC Discussion Forums