WSH and events 
Author Message
 WSH and events

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?



Sun, 06 May 2001 03:00:00 GMT  
 WSH and events
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?



Sun, 06 May 2001 03:00:00 GMT  
 WSH and events
I would like to see a persistant mode so that the script would keep itself
in memory untill a Wscript.quit or the timout value specified in the .wsh
file is reached.
Something like Wscript.persist = true

This way we could put Wscript.quit inside the appropriate event function and
not have to use wait functions.

Regards,
Ian

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?



Tue, 08 May 2001 03:00:00 GMT  
 WSH and events

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?

Provide a signal or semaphore object. We wrote a simple DLL that supports a
signal
object that we create and then wait on (with a timeout) so we can block and
still service
events. In the event callback, we can signal the object which unblocks the
script.

Mark



Tue, 08 May 2001 03:00:00 GMT  
 WSH and events
Hello Andrew and All,

 at first, with WSH V1.0, we were not able to work with
events (we could accomplish this only with separate
written dll's).

 Second: The events we want to have are not provided
by the system (no objects):
-       waiting for a file beeing closed
-       waiting for a new line in a open file (appended)
-       waiting for a time
-       waiting for updating a directory or file
-       waiting for windows shutdown
-       waiting for user logoff
-       waiting for a process to terminate
and much more.

 The idea with the semaphore is very good.

Best regards,
Manfred Braun
SCA Packaging Deutschland
Headoffice IS Systems


(Remove the "anti-spam" underscore to mail me).

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?



Sat, 12 May 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. WSH and Events with MSAgents

2. WSH and Event Tracking

3. wsh and event logs

4. WSH and Event Tracking

5. WSH and Event Log

6. WSH, WebBrowser & Dynamic Event Binding

7. Problem with syntax for sinking events in JScript under WSH

8. wsh and catching events

9. Events in WSH

10. Can WSH (VBScript) do event handling?

11. Events+JScript+WSH

12. W2000, COM+, Events and WSH/Script

 

 
Powered by phpBB® Forum Software