# AG\_EVENTWAIT
> [HTML Version](ag_eventwait.htm)
_Reviewed and revised December 2023_
**tab(-10, AG\_EVENTWAIT); parentid, ctlid, opcode; chr(127);** [Tab(-10,x) Syntax Notes](ag_xxx_syntax-notes.htm.md)
AG\_EVENTWAIT (33) waits for an event, while allowing the focus to be moved around a set of buttons defined by the _parentid_ and _opcode_ parameters. The command is used internally by ATE for implementing the AUI\_EVENTWAIT function, which should be used in applications rather than AG\_EVENTWAIT directly.
**Response**
A comma-delimited pair of numbers: _exitcode, ctlid_ CR
This function has both a [subroutine and a print tab implementation](subroutine-print-pairs.htm.md).
**See Also**
• [AUI\_EVENTWAIT](aui_eventwait.htm.md)[xs](keyword-types.htm.md)