%OP%BON %OP%HM3 %OP%FM4 %OP%BM0 %OP%LM6 %CO:A,12,72% %H2%USER NOTES FOR LACKEY %H2%September 1990 %H2%How lackey is used.%H2% LACKEY is a 'laptop command key' program, or a 'line-address command key' interpreter. It's really called Lackey because within reason it will do whatever you need of it. It is a Basic program that operates in the Basic application of your Z88, but can be accessed from any other application. On its own it does nothing useful, as it is a 'shell' program. But once you have inserted your favourite command line interpreter (CLI) files into it, the program becomes as useful as you like to make it. By attaching the CLI files to each of the numeric keys, it turns them into 'function keys', that is, keys that will perform familiar operations which would otherwise entail striking a long sequence of keys or waiting for the Z88 to perform lengthy procedures requiring your intervention. With Lackey, a typical operation from Pipedream would be to strike three keys: []B to enter Basic, and a numeric key to execute the CLI file (which is now no longer a separate file, of course, so it is better called a 'COMMAND LINE'). If you wish, you can write command lines that offer 'VARIATIONS', such as a choice of how many times the command is repeated. For these, one or more further keystrokes would be needed. Its use is now described in more detail. After striking []B, a MENU is displayed offering a choice of nine function keys, one for each of the numeric keys 1 to 9. The menu assigns a LABEL to each key, which you wrote yourself, saying what it does. A tenth key quits Lackey. You select a key from the menu and strike it. But if you can remember what key you want, say 7, you strike []B7 without waiting for the menu to appear. If you have more than nine function keys, you will want more menus. At the top of the menu is a banner bearing the TITLE of this particular menu. At the foot there is a strip giving the titles of the other menus that you have, each associated with a letter key. From this menu you can call any of the others by striking that key instead of a number key. It does not matter whether you use upper or lower case. The titles, again, were written by you. It follows that you can have up to 26 menus (and therefore 234 command lines). When you strike []B to enter Basic, Lackey will automatically display menu A, but by striking another letter, you can change that. The new menu remains available, however many function keys you select from it, until you change it again. This means that you do not have to press a letter key whenever you use one of the function keys. You just organise things so that all the command lines you use together in a particular application or for a particular task appear in the same menu. If you use some command lines for several tasks, their labels can be repeated in all the menus without neeeding to rewrite the command line itself. Again, if you can remember the keystrokes, you do not have to wait for one menu to appear before changing to another. You simply use the letter key in the way you would use a shift key or control key to precede the function key. So, from another application you could type []BD7 to execute item 7 in menu D. But if menu D was already installed you would only need to type []B7. If the command you select from the menu is one with variations, a prompt will appear on the second line of the menu, with a flashing arrow to the left of it, asking you for some reply. If the command is to copy lines between two files, it may ask how many lines you want to copy. If the command loads a file from RAM, the prompt may ask you for the name of the file. In this case the letters you type are displayed at the end of the second line. The wording of the prompt is again something you write yourself. Before you can use Lackey, it must be up and running in Basic. So there is a preliminary step in which you enter Basic, clear any old programs by typing NEW, and type CHAIN "LACKEY.BAS" (or, alternatively, LOAD "LACKEY.BAS" followed by RUN). This brings the first menu to the screen. You can then leave this (or any other) menu up and at the ready whilst you leave Basic and enter whatever application you are engaged in. You can leave this Basic application as a 'suspended activity' permanently, if it suits you, so that the function keys are always available. It is labelled LACKEY in the Index suspended activities menu. This must be your only suspended Basic application if you wish to call it repeatedly with []B, although, of course, it can always be accessed from the Index menu. %H2%Do you need Lackey?%H2% Lackey is based on another program for producing function keys called Funkey, by Michael Hey and Barry Green. The idea originated there. In its current version Funkey offers a single menu for command lines without variations. If you only want to assign simple command lines to no more than nine function keys, then you should use FUNKEY, which has the great merit of being very much shorter than LACKEY. It is listed in Z88 Eprom 4.3.12. If you do not have much RAM to spare, space may decide whether you use Lackey, as without any command lines it uses 3330 bytes of memory when compressed as a Basic program (and a couple of menus can double that). However, you may not need to load the whole of Lackey. If you want more function keys, but only want to assign simple command lines to them, then you only need part of Lackey. You may discard PROC_VARY and all following procedures (that is, line 1500 onwards). As an alternative, of course, you may have several versions of Funkey for different menus. If "spread" (see later) is the only type of variation you need, then you can omit PROC_PROMPT and PROC_INTERP. %H2%How to write simple command lines into Lackey.%H2% The remainder of these notes explain how to fill the shell with the command lines you want to use. If you want more informatiion about writing command lines, you should read about CLI files in the Z88 manual (which does not say very much about them) or the various Z88 guides, or back issues of Z88 EPROM. As an alternative to writing them, you could adapt command lines from the CLI library run by Michael Hey for the Z88 User Club. The best way of adding your command lines is to load Lackey into Pipedream, choosing the "load as plain text" option, where you have full editing facilities. When you have finished, you open a blank first line and type in .J, without any line number. Save the file as plain text, move to Basic and type *CLI .*. The program will then be reeled into Basic, taking an impossibly long time. To make it quicker to load and more economical to store, you can then save it as a Basic file with SAVE "". In future, this can be loaded as described in the last section, in a flash. To get the program back into Pipedream once you have tested it and found all your errors, load it into Basic and type LIST[]=S. The program will scroll through the screen, whilst being transferred to file :RAM.-/s.sgn. When it has finished, type []-S, go to Pipedream and load this file as plain text. You will need to clean off the bottom line. Then GO TO THE FILER AND ERASE THE FILE :RAM.-/S.SGN, which would otherwise cause the Z88 to crash on a reset. Having rehearsed these basics, we can now move on to the real subject. The first thing to realise is that the shell program begins on line 1000. The earlier lines are reserved for your command lines. Some of them have been taken up with demonstration lines. If you have already loaded Lackey, the demonstration program will enable you to get the feel of it. In the explanations below, it will be used to illustrate how to write in diferent types of command line. Remember that key A6 is executed from program line 6, and key B7 froom line 17, and so on. Do not expect the demonstration commands to do much of interest. They are all commands which alter the Panel settings, and are self-repetitive and fairly trivial applications of the facilities. Their advantage over more realistic applications is that they demonstrate the workings of Lackey without the need to set up anything else and with minimum effect on your files (just set up the panel as you like it when you have finished and erase the stray file in RAM.0 called PanelA that one of the commands creates). They can also be executed without leaving the menu, which makes demonstration much quicker. If used in this way there is no need to key in []B. Their difference from commands that you would write for normal use is that they do not return you to the application you were in when you pressed the function key. The one exception is C1, which will return you to whatever application you were in. To use Lackey for your own command lines you must begin by erasing all lines before line 1000, although you may like to save them first. Let us first consider SIMPLE command lines without any variations. And let us suppose that you only wish to use nine of them, so that they can all be in one menu. The command lines will be put in program lines 1 to 9, one command line per program line. There should be no gaps; if there empty function keys they should be written like program lines 22 to 29 in the demonstration. All the program lines you enter must begin with the word DATA in upper case, which tells the program that this is information to be read later. The entry for each of these lines has two parts, separated by a comma: DATA "