Description
Executes an event (as compared to Post_Event(), which queues an event for execution).
Syntax
status = Send_Event (targetctrl, eventname [, arg, ...])
Parameters
The Send_Event function has the following parameters.
Parameter | Description |
---|---|
targetctrl | Specifies the window or control to post the event to. To post an event to a window, pass the window ID; to post to a control, specify the control entity ID (CtrlEntID) as the control name concatenated to the window ID and separated by a period. For a single-instance window, the window ID is always identical to the window name; for multi-instance windows, the window ID, returned from Start_windows or an equivalent function, is not necessarily the window name. |
eventname | A valid event name, such as CLICK, READ, OMNIEVENT, and CLOSE. |
arg... | Pass any number of arguments that are needed by the event handler associated with the event specified in eventname, up to 20 are supported. |
Returns
Null if the event executed successfully, otherwise the event's error code is returned.
See also
Forward_Event, Get_EventStatus(), Post_Event(), Set_EventStatus()
Example
/* Executes the CLICK event that is associated with the control called BUTTON_1 on the window called TEST_WINDOW1. */ status = Send_Event("TEST_WINDOW1.BUTTON_1", "CLICK")