Sleep with $com sucks for very short times, such as 100 ms, because a wsf file needs to be written and then executed. Why this needs to be done, I have no idea... Anyone know why mirc can't make direct use of the WScript Sleep method?
There really needs to be a REAL /sleep in mirc....
Lets say right in the middle of processing a script, I need to download a file before proceeding... check out this example:
; echo -a $wwwget(http://blah.com/blah.html)
wwwget {
unset %HaveFile
sockopen blah blah.com 80
sockmark blah $1-
while (!%HaveFile) { sleep 100 }
}
; omitting sockopen and sockread
on *:sockclose:blah:{ set %HaveFile $true }
While I could chop the hell out of my single alias (the one that contains $wwwget) and use a ton of global variables, I'd rather not...