# AG\_CONTROL > [HTML Version](ag_control.htm) _Reviewed and revised December 2023_ **tab(-10, AG\_CONTROL), opcode, ctlid, ctext, cstate, ctype, cmd, func, srow, scol, erow, ecol, fgc, bgc, fontattr, fontscale, fontface, tooltip, parentid, rtnflag, winclass, winstyle, winstylex, ctype2; chr(127);** [Tab(-10,x) Syntax Notes](ag_xxx_syntax-notes.htm.md) **tab(-10,AG\_CONTROL); ctext, ctype; chr(127);** **tab(-10,AG\_CONTROL); ctext, typejust; chr(127);** AG\_CONTROL (20) is the equivalent of [AUI\_CONTROL](aui_control.htm.md)[xs](keyword-types.htm.md). It is used internally for forwarding those functions from A-Shell/Unix to ATE, although it also can be used directly with an application to create, delete, or perform various other operations on GUI controls. The second and third syntax variations are abbreviated versions for simplified creation of text and data field controls, with the coordinates based on the current screen position and length of the text and most other attributes defaulted. The number of required parameters depends on the opcode; see [AUI\_CONTROL](aui_control.htm.md)[xs](keyword-types.htm.md) for details and additional information. To output an explicit double-quote character in the middle of a field, you can "escape" it using HTML syntax, by %22 (a percent sign followed by the value of the character in hex notation). [AUI\_CONTROL](aui_control.htm.md)[xs](keyword-types.htm.md) haandles this for you—yet another reason to use it instead of AG\_CONTROL. This function has both a [subroutine and a print tab implementation](subroutine-print-pairs.htm.md). **Parameters** Nearly all of the parameters correspond to those already documented for th AUI\_Control routine. The only exceptions are the removal of the AUI\_CONTROL _cstatus_ parameter (which is output-only and thus has no purpose in the command string sent to the client), and the addition of: _rtnflag_ "1" causes the function to return a string of result information in the keyboard buffer. Otherwise there is no response. _typejust_ (For text fields) a two character abbreviation from the set of (**TL, DL, TC, DC, TR, DR**) indicating a type (**T** for plain text or label; **D** for data), and a justification code (**L **for left, C for center, **R** for right). The **D**ata type is displayed inside a sunken box; see [MX\_SINK](mx_sink.htm.md)[xs](keyword-types.htm.md). **Response** None, unless _rtnflag_ is set to "1", in which case it returns a comma delimited list of two values: _cstatus_, _ctlid_ . See example below. **Example** ? TAB(-10,AG\_CONTROL);"1,0,OK,0,";MBF'BUTTON;",%VK\_xF101%,",12,5,13,10";chr(127); ? TAB(-10,AG\_CONTROL);"1,,Dr A~VK\_xF1001~~Dr B...";chr(127); xcall NOECHO input CSTATUS,CTLID **See Also** • [AUI\_CONTROL](aui_control.htm.md)[xs](keyword-types.htm.md)