JSI Tip 7499. Event freeware waits for, or signals, an event for inter-process communication.


Download Event.zip, which Waits for, or signals, an event for inter-process communication, and optionally sends CTRL+C, or CTRL-BREAK, when the event is triggered.

When you type event /?, you receive:

Version 1.1, Copyright (C)2002, Frank P. Westlake.
Waits for the specified event or for the specified number of milliseconds.

Event \[/wait\] EventName \[time out\]

/B           Generate a CTRL-BREAK when the event is triggered.
/C           Generate a CTRL-C when the event is triggered.
/wait        Wait for the event named "EventName" to be set. The default is
             to trigger the event
EventName    A unique name for the event. Names are case sensitive, may not
             contain a backslash ('\'), and must be no longer than 260
time out     The desired number of milliseconds to wait for the event to occur.
             The default is to wait indefinitely.

The function of this program is to provide a controllable pause from within a
script. When the /wait switch is specified this program will sit in an
efficient wait state until an event is triggered with the given name. Another
instance of this program may be used to trigger that event. When the event is
triggered this program will simply exit. If the /B or /C switches are specified
a CTRL-BREAK or CTRL-C event will be sent to the console group before exiting.

  START "TITLE" /B %ComSpec% /C"Event /wait FireAlarm & SendALARM.bat"
  IF "%SMOKE%"=="FIRE" Event FireAlarm

0=Success            1=Time out expired   2=Failed to trigger event
3=Argument error     4=CTRL-C             5=CTRL-BREAK
6=Window close       7=Logoff             8=Shutdown.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.