/* * Name: RECORDIT XEDIT * Author: Mark J. Short * Date: December 6, 1989 * * Description: * This Xedit macro used to record the cmdline into a file. * What this gives you is the ability to write an XEDIT macro as * you test it. It is invoked by typing "RECORDIT filename" on the * command line. This will cause every line command to be recorded * in a filed named "filename xedit a" until "end" is typed on the * command line. The file will have all the commands surrounded by * quotes, and the comment line on line one. */ address command "EXEC CLICKER RECORDIT" address XEDIT arg fn . if fn = '' then do Msg 'Type a filename over FN command line and try again!' Emsg "Recorder FN" "Cursor Cmdline 10" return end tline = '' cline = '/* Recorded macro - ' fn '*/' address command "EXECIO 1 DISKW" fn "XEDIT A (VAR CLINE )" cline = 'address XEDIT' address command "EXECIO 1 DISKW" fn "XEDIT A (FINIS VAR CLINE" Do while find('END QQ QQUIT FILE',tline) = 0 Msg '***' fn 'XEDIT A is being recorded, type "END" to stop. ***' address command 'MAKEBUF' "READ CMDLINE NOTAG" Parse Pull tline address command 'DROPBUF' cline = tline upper tline if tline <> 'END' & tline <> '' then do cline cline = '"' || cline || '"' "extract/enter/" if tline <> enter.2 & tline <> "?" then address command "EXECIO 1 DISKW" FN "XEDIT A (VAR CLINE FINIS )" end end Address XEDIT 'MSG Keystrokes recorded and stored in' fn 'XEDIT' A