guides:programming:programmers_reference_manual:send_event_oi_9

Send_Event (OI 9.x) function

Executes an event (as compared to Post_Event(), which queues an event for execution).

status = Send_Event(targetctrl, eventname [, arg, …])

The Send_Event function has the following parameters.

ParameterDescription
targetctrlSpecifies 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.
eventnameA valid event name, such as CLICK, READ, OMNIEVENT, and CLOSE.
argPass any number of arguments that are needed by the event handler associated with the event specified in eventname, up to 20 are supported.

Null if the event executed successfully, otherwise the event's error code is returned.

/* 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")
  • guides/programming/programmers_reference_manual/send_event_oi_9.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1