MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%Trigger ( [ Object.] Event [ , Information ] )

Trigger a low-level event, using the MWAPI command ETRIGGER.

Object The control or window on which the event is to be triggered. If missing, default to the current object.

Event A low-level event name, or its corresponding MWAPI name.

Information A local or global reference containing additional information to be supplied when the event occurs. This corresponds to the optional second argument of the command ETRIGGER.

The macro %%Trigger is used to place a low-level event onto the end of the event queue. It corresponds to the MWAPI command ETRIGGER, described in the MSM-GUI Reference Manual. It should not be confused with %%Perform which immediately executes the action logic associated with an event.

The parameter Event cannot be a variable, and if the specified event does not apply to the object, or the object does not exist, a run-time MWAPI error occurs.

Examples

%%Trigger(Win1.Button1.SELECT)
Trigger a select event for the control called "Button1" on the window called "Win1".

%%Trigger(@gad.keyUp,info)
Trigger a keyUp event for the control named in variable gad on the current window, passing the local array info to the event.

%%Trigger(..restore)
Trigger a restore event for the current window.

See also

%%Perform.