imacro [window_type] key value
where key is a valid name for a keyboard key and value is the command to be printed to the console, pending completion. If present, window_type must be one of the window types recognized by the specialopen command: layout, color, netlist, or wind3d. If omitted, the layout window type is assumed, unless the command was called from inside a window using the colon or semicolon escape to the command-line, in which case the type of the calling window is assumed.
The imacro command allows a variant of the macro command in which the bound command, rather than being immediately executed, is instead printed to the console as the beginning portion of a command, awaiting completion. It can be used to simplify typing of commands by pre-formatting the command line with the command and possibly some options. For example,imacro p "paint "will allow the single keystroke "p" to automatically format the command "paint " on the command line, waiting for the user to enter the type to paint and execute the command.
Unlike the macro command, commands entered by imacro are ultimately evaluated by the Tcl interpreter, and so may contain Tcl commands as well as magic commands.
imacro is implemented as a built-in window command in magic.
|Return to command index|
Last updated: November 9, 2004 at 10:13am