# AGCMD > [HTML Version](agcmd_lit.htm) **AGCMD \{switches\} ** AGCMD is used to send an AG\_xxx function from the system prompt or from within a command file, thereby avoiding the need to write and compile a program. It is useful for experimentation and for inserting simple ATE or other GUI configuration functions in startup command files. **Switches** | **Switch** | **Function** | |------|------| | /K# | Assign result to DO file variable \$KBD# | | /S | Silent (don't display the command response) | | /N | No wait (don't wait for any response) | | /W:# | Wait # seconds for response (overriding default) | | /? | Writes switch listing and usage info to the screen. | **Parameters** _cmd_ the symbolic AG\_xxx name—case insensitive, with or without the AG\_ prefix—or numeric value of the AG command to execute. _parms_ the parameter list as it would be passed in the AG\_xxx statement, except without the trailing chr(127). **Examples** AGCMD WINEXEC,\$DEL %ATE%\\dsk0\\001004\\ftpdlx.log AGCMD WINTITLE,This is the new and improved title AGCMD SHOWWINDOW 3 AGCMD STATUSLINES,1,0 AGCMD/S 24,cmd.exe,option,"/c ipconfig > ipcfg.lst",,0,1 AGCMD/N PALETTE,3,0,123,207,242 AGCMD/S/K1 BROWSEFOLDER .AGCMD GETENV %TEMP% Response = C:\\Users\\joaqu\\AppData\\Local\\Temp **Comments** If neither of the /N or /W:# switches are specified, AGCMD will use the "normal" wait value based on the function itself, ranging from no wait (for functions with no response, e.g. AG\_STATUSLINES), to a few seconds (for functions with an immediate response, e.g. AG\_GETENV), to unlimited (for functions which require a user response, e.g. AG\_WINPTR). Some functions have a variable response (or lack of), depending on the function parameters. For example, AG\_PALETTE has no response when used to set a color, but has a "standard wait time" response when used to retrieve palette info. For these functions, AGCMD defaults to the "standard wait time" of a few seconds. To avoid waiting for a response that won't be coming, use the /N switch as in the example above. **History** 2023 August, A-Shell 6.5.1740, AGCMD.LIT 1.0(108): Enhanced to support AG\_FILETIMES, AG\_GETDPI, AG\_DPM, AG\_DIRCLEAN. 2017 July, A-Shell 6.5.1610, AGCMD.LIT 1.0(105): Enhanced to support AG\_SCROLLBACK: .AGCMD AG\_SCROLLBACK -1 ; toggle .AGCMD AG\_SCROLLBACK 1 ; show/enable .AGCMD AG\_SCROLLBACK 0 ; hide/disable 2011 May, A-Shell 5.1.1215: Added function to A-Shell