GuiInfo()
Returns information about REXX GUI's environment.
information = GuiInfo(Type, Additional1, Additional2)
Args
Type is which type of information to return. It must be one of the following:
Options Meaning WINDOW Returns the handle to the first window opened if some object that you created has an open window, or an empty string if there are no more windows open. HANDLE Returns the handle for a control. Additional1 is the variable name associated with the control. VARIABLE Returns the associated variable for some handle to a control. Additional1 is the control's handle. If the handle is to a window instead, then this returns an empty string. MSGS Returns the next message that can be sent to a control (via GuiSendMsg). Additional1 is the enumeration number, where 1 is the first message string, 2 is the second, etc. Additional2 is the type of control, for example, PUSH, COMBO, TREE, etc. EVENTS Returns the next event string for a window, or a specified type of control. Additional1 is the event string you wish to retrieve, where 1 is the first event string, 2 is the second, etc. If Additional2 arg is passed, it is the type of control, for example, PUSH, COMBO, TREE, etc whose event strings are to be enumerated. If omitted, then the events for a window are enumerated. CHILD Enumerates the child windows of a REXX GUI window. Additional1 is the handle of the window whose child windows are enumerated. Additional2 is the name of a subroutine in your script which is called for each child window enumerated. ARG(1) passed to this subroutine is the handle to the child window, and ARG(2) is the name of any REXX variable associated with this child window (or an empty string if none).
If Type is omitted, then it defaults to 'WINDOW'.
Returns
If successful, the information as described above is returned. If an error, an empty string is returned.
Examples
/* Display all window events. */ i = 1 DO FOREVER msg = GuiInfo('EVENTS', i) IF msg == "" THEN LEAVE SAY msg i = i + 1 END /* Get the handle of the control associated with the variable MyControl. */ handle = GuiInfo('HANDLE', 'MyControl')