It seems to me that at the minimum WSH needs some sort of "wait for event"
command, preferably with a timeout. I guess this could be implemented in the
WSH object model somewhere. That way, you could do something like...
Do While Not bDone
objWait.EventWait 10
Loop
I've already hit the lack of event support in WSH 1.0 in several script
projects. For example, it's quite easy to use IE as a sort of "form engine"
as a quick substiture for true form support, but it's almost impossible to
figure out when IE is closed, or the form submits, etc, without this sort of
event support.
--
Tim Hill -- Windows NT MVP
(Pursuant to US Code, Title 47, Chapter 5, Subchapter II, 227, any and all
nonsolicited commercial E-mail sent to this address is subject to a download
and archival fee in the amount of $1000 US. E-mailing denotes acceptance of
these terms.)
Quote:
>We're working on WSH 2.0 at the moment and we're intrigued to know how many
>of you are using events from objects you use in WSH. If you are using
them,
>what is the most common way you deal with making sure WSH stays around long
>enough to respond to the events.
>How could we make it easier for you and how important are events in your
>batch files?