EventMask

Property

Document.EventMask ( read-write, Integer )

Syntax

Document.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 Document 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 document. We assume that the document object is named 'doc' in all examples.

 

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

doc.EventMask = 1 Or 2

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

doc.EventMask = doc.EventMask Or 4

Disable notifications for Save events. Other notifications are unaffected.

doc.EventMask = doc.EventMask And (Not 8)

Disable all notifications.

doc.EventMask = 0

Enable all notifications.

doc.EventMask = (-1)