EventMask

Property

Application.EventMask ( read-write, Integer )

Syntax

Application.EventMask

Remarks

EventMask controls which codes the Notify event reports to a script, and which codes will be hidden from the script.

The EventMask property is a bit mask. Each bit of the EventMask value corresponds to a particular event that a script may receive. If the bit is set to 1, then whenever the event occurs MaxIm calls the Notify event to communicate this to the script. If the bit is set to 0, the script is not notified, even if the event occurs.

See the Notify event for a table of event codes that may be reported by the Application object. Each event code has a particular mask value associated with it, also given in the table.

Some EventMask examples are given below. For brevity, each example omits the code required to set up and connect to the application, and to shut down when finished. We assume that the application object is named 'app' in all examples.

 

Initialize the event mask. All command sequence events will generate notifications. No other notifications will be generated.

app.EventMask = 1 Or 2

Enable notifications for the 'Autofocus Completed' event. Leave other notification settings unchanged.

app.EventMask = cam.EventMask Or 1024

Disable notifications for telescope slew events. Other notifications are unaffected.

app.EventMask = cam.EventMask And (Not (16 Or 32))

Disable all notifications.

app.EventMask = 0

Enable all notifications.

app.EventMask = (-1)