; ; Name of Macro: Load Exit ; ; The following macro will start Lexa Text from the DOS command line, load ; a file called SAVE.TST, enter a few numbers, show the details of the file, ; save it to disk automatically and then exit to DOS again. To start it ; type LE.BAT at the DOS prompt. ; ; On the structure of this file: Any line which begins with an exclamation ; mark is a command. This is a number followed by a tab, a semi-colon and ; then the description of the command from the menu system. ; ; Any plain text will be taken to be normal keyboard input and stuffed ; into the keyboard buffer at the relevant point in the macro. ; ; Each line of the macro is processed until the end is reached and the ; macro stops. ; ; A macro can be passed to Lexa Text from the DOS command line as follows ; for example: ; ; ltext /m-start.mac ; ; You can in fact first initialise Lexa Text and then carry out the macro ; by typing: ; ; ltext /i /m-start.mac ; ; Remember in this case to either pass a name for a file to load or to ; include commands for this in the macro itself. ; ; A macro can have a maximum of 255 lines. Text lines can have a maximum of ; 255 characters. ; ; Do not call a macro within a macro; this causes infinite recursion, i.e. ; your computer will hang. ; ; Note that if you call another programme or shell down to DOS during a ; macro then command is passed away from Lexa Text and you must type ; something, like "exit", to get back into Lexa Text again. If there ; are commands/text still left in the macro then these will be processed. ; ; To enter a command from the menu system into a macro file like the present ; one, you press Alt-Return (a mouse click won't do!). Command from the ; following menu systems and picklists can be entered into a macro file: ; ; Text editing menu system ; General edit key picklist ; Word attribute picklist ; Directory list menu system ; Database editing menu system ; ; There is a supplied file MAC_COMM.LST which contains some commands which ; might be necessary but which are not included in any menu or picklist of ; Lexa Text. In addition note that the following words can be entered after ; a question mark to achieve a particular effect. ; ; ?beep 2 ; make a beep twice (default = 1) ; ?pause 5 ; pause for 5 seconds (default = 1) ; ?wait ; wait for user to press any key ; ; There are a few other special characters which users should be aware of. ; The first is the sequence `\n' which will force a carriage return to be ; entered into the text, i.e. a new line is begun. The second is the ; symbol `î' which can be followed immediately by `t' or `d' to enter the ; current time or date respectively (do not, of course, type the inverted ; commas into the macro!). These features can be seen in the following ; lines of the present macro. ; ; \nPresent time: ît ; \nPresent date: îd ; ; To activate a macro you can either choose one from a directory listing ; (press Ctrl-F5 to call directory lister) or you can link a macro with a ; combination of Alt + letter just as you would with a simple text command. ; This is done by opening the Alt macro window with Shift-F2 and then ; entering the name of the macro file. Note very carefully that this file ; name must be preceded by a question mark for Lexa Text to understand that ; it is a macro file, e.g. ?TEST.MAC. Furthermore Lexa Text searches for ; the file in the current Auxiliary File Directory unless path information ; (drive and/or directory) has already been entered by the user. ; ; Lastly, a word of warning: command macros are powerful tools, but they ; can be dangerous things if they do not function correctly (you can delete ; files with macros or you can ignore warnings about data in system memory, ; for example). Make sure that your macros do exactly what YOU want by ; allowing for a trial phase with irrelevant data, for instance a temporary ; copy of the data you really wish to process. The best way to try out a ; macro is to write down all the steps necessary on a sheet of paper and ; try these out manually. When you are sure that the type and sequence of ; commands is correct you can enter them into a macro file. ; ; save ; !7181 ; Enter, Carriage Return ; !20480 ; DOWN_ARROW 0x5000 (80 * 256) !20480 ; DOWN_ARROW 0x5000 (80 * 256) !20480 ; DOWN_ARROW 0x5000 (80 * 256) !20480 ; DOWN_ARROW 0x5000 (80 * 256) !20480 ; DOWN_ARROW 0x5000 (80 * 256) !20224 ; End End of line 123456789 \n \nPresent time: ît \nPresent date: îd \n ?pause 2 ; !17219 ; C-Sh-F9 Full file info ; ?beep 2 ?pause 2 x ; !-30208 ; Ctrl-F12 Direct save one ; !16640 ; F7 Return to DOS ?pause 2 n ; ; End of File ;