next up previous contents index
Next: The Set Attributes Button: Up: The Define Macro Button: Previous: The Define Macro Button:   Contents   Index


Macro File Format

The .xicmacros file can contain any number of macro definitions. It is not expected that most users will have a need to work with this file directly, though the possibility exists. Each macro consists of a block of lines in the following form:
#macro
KeyDown(... , NULL)
statements
#end

Lines that start with `#' that are not script preprocessor keywords (see 18.8) are taken as comments. The body of the macro consists entirely of calls to four script functions KeyDown, KeyUp, BtnDown, and BtnUp. The first line must be a KeyDown command which specifies the character mapped to the macro. The widget string is the value ``NULL''. The remaining lines contain calls to these functions, which simulate the button and key presses recorded in the macro.

The events processed while Xic is in use are recorded in the xic_run.log file (see 2.9.1). This file and other log files are stored in a temporary directory, which is deleted when Xic terminates normally. To access the xic_run.log file from Xic, press the Log Files button in the Help Menu, then select the xic_run.log entry in the resulting file selector, then press the green octagon on the file selector. Advanced users can cut/paste sequences of the commands into script files or macros.


next up previous contents index
Next: The Set Attributes Button: Up: The Define Macro Button: Previous: The Define Macro Button:   Contents   Index
Stephen R. Whiteley 2024-09-29