/* GUIBEGIN WINDOW , 21, 89, 249, 38, POPUP|CAPTION|SYSMENU|MINBOX|MAXBOX|THICK, , Dismiss FONT 8, 400, MS Shell Dlg PUSH 4, 20, 40, 14, TABSTOP, , OkButton, , &Ok TIMER 5000 DEND GUIEND */ /* This script presents a window containing a TIMER control set to time-out * at 5000 milliseconds (ie, 5 seconds). It also contains a PUSH control. If * the user hasn't clicked the button within that time-out, the window is * automatically destroyed (and this script ends). */ OPTIONS "C_CALL LABELCHECK" LIBRARY rexxgui GuiErr = "SYNTAX" GuiHeading = 1 GuiCreateWindow('NORMAL') Again: DO FOREVER GuiGetMsg() CATCH SYNTAX CONDITION('M') SIGNAL Again CATCH HALT FINALLY GuiDestroyWindow() END RETURN /* Called by Reginald when a time-out happens for our window. */ WM_TIMER: /* Post a WM_CLOSE to simulate the user closing the window. */ GuiSendMsg(, "POST CLOSE") /* Return nothing so that this time-out happens only once. */ RETURN /* Called by Reginald when our "OkButton" is clicked. */ WM_CLICK_OkButton: /* Here we could kill the timer, by calling GuiRemoveCtl with * no args. But note that closing the window automatically * destroys the timer. If you wanted to instead GuiWake * someone, you'd typically kill the timer first. */ GuiSendMsg(, "POST CLOSE") RETURN