David Foster delves into his box of hints and tips Protext, the word processor produced by Arnor, has now been available on the CPC range of computers for more than a year and there are several thousand users around the world. One of the features of Protext, and indeed one of Amor's specialities, is that not only is it on tape and disc, but a ROM version is also available. Since its introduction, Protext has undergone a process of steady development, but upwards compatibility has always remained a priority and the developments have mostly taken the form of a number of small but important additions to the program. At the same time several other programs have been launched by Arnor, all designed to work in conjunction with Protext until now we have Prospell, the spelling checker, Promerge, a mail merging program with many other enhancements and Promerge plus, which is only available on ROM and provides background printing, two file editing and box mode editing in addition to the mail merging facilities. The end result is an integrated suite of programs which provides just about every facility the serious word processor user could want, while still retaining the basic simplicity of the original. When I was asked to suggest some hints and tips for Protext users, I tried to confine them to the basic program and as far as possible to ones which will work with all versions from version 1.00. The current product is v1.22 and I would suggest that anyone who has an early version should consider taking advantage of Amor's upgrade facilities, as the enhancements such as decimal tabs and the extra stored commands, are well worth having. I would also recommend that if at all possible you get the ROM version as not only does it allow you to handle larger files (up to about 39k), but it is so convenient that you will find you make a lot more use of Protext. Using 'template' files Protext is very flexible in the facilities it provides to customise printing options and on all versions it is possible to set many of them by the use of stored commands as well as by the SETPRINT command, which provides the facility to redefine virtually all the parameters. Having to set them each time you want to create a document is a nuisance and was never the intention. Most people use only two or three different layouts for most of their word processing. For example, my most frequent requirements are a layout to suit a letter on single sheet stationery and layouts to suit single and double spaced manuscripts on continuous stationery. There are two ways that these layouts can be created so as to be readily available at all times. The first and best way is to use stored commands to set the parameters such as top, bottom and side margins, line spacing and page length. On later versions it is also possible to specify whether single sheet or continuous printing is required. If these stored commands are inserted at the start of a document they will override any default settings provided by SETPRINT, so the answer is to put them in an empty document and then to save this "template" with an appropriate name. When you start a new document it is only necessary to load the appropriate file and all the parameters will be set automatically. Another advantage is that if you don't complete the document in one session and save it for later, when you load it again it will have the correct settings as the stored commands were saved with it. An example of the stored commands I use for a letter on A4 paper is given in Figure I. This is saved on my disc with the highly original name, LETTER. >----!---------------------------------------------->C0 A4 letter head - page 2 on numbered >PL 66 >TM 0 >SH 8 >PN 2 >HE % My Address is here Figure I: Example of a letter template Several points are worth noting about it. Firstly the top margin is set to zero because my printer requires a lot of paper fed through before printing and when used with a page length of 66 gives a well proportioned letter with A4 paper. Secondly, I wished to have any continuation sheets numbered, but not the first, headed, sheet and this is achieved by taking advantage of the fact that headers are only activated at the start of a new page. So by inserting a blank line before the command which sets the header containing the page number, Protext thinks it has started printing the page and ignores the header command until it starts to print the second page, at which time it prints the header containing the page number, which is set to an initial value of 2 with the PN stored command. Users of early versions will find that it will still be necessary to use SETPRINT to set some parameters, such as whether printing is to be done on continuous stationery or single sheet, but again there is an easy way to solve this problem. If you use SETPRINT to set the required parameters they can be saved at the end, as part of the "Printer Driver". If you give it an appropriate name you can use the PRINTER command to load it again when you want to set the parameters for a new document. This process can be automated even further by making use of the function keys as described below. Function keys The latest version of the manual gives a lot more detail about how to make good use of the function keys on the numeric pad to the right of the keyboard, but for the benefit of those people with earlier versions here are a few more details. The KEY and KEY DEF commands available in Basic may be used-to define strings of text and allocate them to any of the keys on the keyboard before entering Protext - or for that matter during its use - by temporarily exiting Protext with QUIT and then reentering it with IP after defining a key. Limitations are imposed by Amsdos on the total size of the strings, but again there is an easy way round this, which I shall cover shortly. For example, typing KEY 128, "CAT"+CHR$(13) will define key f0 so that pressing f0 in command mode will result in a catalogue of the currently selected disc drive. CHR$(13) is the value which is normally sent when the Enter/Return key is pressed, so this simulates pressing the Return key. KEY 129, "This text will be entered into the document" will enter the string of text into the document when fl is pressed while in edit mode. This is particularly useful if you are writing a document which contains words often repeated in it. Key code Key code CTRL-@ 0 CTRL-C 27 CTRL-A 1 CTRL- 28 CTRL-B 2 CTRL-] 29 CTRL-C 3 CTRL-# 30 CTRL-D 4 CTRL-0 31 CTRL-E 5 CTRL-< 218 CTRL-F 6 CTRL-> 219 CTRL-6 7 CTRL-) 220 CTRl-H 8 CTRL-( 221 CTRl-I 237 CTRL-* 222 CTRL-J 10 CTRL-+ 223 CTRL-K 11 CTRL-hyphen 227 CTRL-L 12 CTRL-/ 231 CTRL-M 238 CTRL-space 235 CTRL-N 14 CTRL-0 15 UP CURSOR 240 CTRL-P 226 DOWN CURSOR 241 CTRl-Q 17 LEFT CURSOR 242 CTRL-R 18 RIGHT CURSOR 243 CTRL-S 19 SHIFT-UP 244 CTRL-T 20 SHIFT-DOWN 245 CTRL-U 21 SHIFT-LEFT 246 CTRL-V 22 SHIFT-RIGHT 247 CTRL-h 23 CTRL-UP 248 CTRL-X 24 CTRL-DOWN 249 CTRL-Y 25 CTRL-LEFT 250 CTRL-Z 26 CTRL-RIGHT 251 TAB 9 RETURN 13 SHIFT-TAB 228 SHIFT-RETURN 236 CTRL-TAB 225 CTRL-RETURN 236 CLR 16 COPY 224 SHIFT-CLR 229 SHIFT-COPY 233 ctrl-clr 230 CTRL-COPY 234 DEL 127 ESC 252 CTRL-DEL 232 Figure II: Protext command code values. It is possible to define tokens 128 to 159 so that they contain whatever you want in the way of text or commands. Tokens 128 to 137 are allocated by default to function keys 0 to 9 by Amsdos, but it is possible to allocate any expansion string tokens to any of the keys, either in normal, or SHIFTed states or with CONTROL pressed and the Amstrad manuals give full details of how to do this using the KEY DEF command. The latest version of the manual also lists the code values given when the Protext editing commands are used and these are shown in Figure II. Armed with these figures you can now create strings which can be made to reproduce all sorts of complicated sequences of key presses which can be called by a single key press. Additionally it is possible to use the KEY DEF command to redefine any of the Protext editing commands to carry out different functions. For example, Ctrl-D normally copies down Protext's default ruler and Ctrl-R copies the last ruler used, but I would have preferred that they copied my own default ruler and an alternate ruler I specified. The following expansion strings and key redefinitions allow me to do just that. All I now have to do is make sure that line 1 of my template file contains my chosen alternate ruler and line 2 my default ruler. The KEY DEF commands at the start of each line redefine keys D and R so that when they are pressed with Ctrl, they give the token values instead of their normal values.
10 KEY DEF 50,1,&72,&52,158:KEY 158, CHR$ (11) +CHR$ (0) CHR$ (27) +CHRS (233)+CHR$(241)+CHRS(233)+CHR$(0)+"9'+CHR$(16)+CHR$(234)+CHR$(11) 20 KEY DEF 61,1,864,844,159:KEY 159, CHR$(11) + CHR$(0) +"9"+CHR$(27)+CHR$(241)+CHR$(233)+CHR$(241)+CHR$(233)+CHR$(0)+"9"+CHR$ (16)+CHR$(234) +CHR$(11)If you follow the strings through, using the table in Figure II, you will see that they set a place marker at the cursor position, jump to the start of the document, set the two block markers, then return to the place marker and copy down the the ruler, before finally clearing the various markers. Another useful string is: 10 KEY 0,CHR$(252)+"S"+CHR$(13)+CHR$(13)+CHR$(252)Pressing key fO while in edit mode will now automatically carry out a save of the document, which allows easil periodic saves for security purposes. The only restriction is that the file must already have been saved, so that it has a filename allocated. It would obviously be more trouble than it was worth if you had to type all these commands in every time you wanted to use Protext, but again this can be automated very easily. If you have the ROM version you can easily create a short Basic program incorporating all these strings, finishing with the command IP, and save it with the name DISC.BAS, so that when you want to use Protext all that is required is to press Ctrl and the small Enter key, which is redefined by Protext to load a file called DISC.BAS Disc version users can incorporate the Basic lines in the file on the Protext disc called DISC2.BAS which is provided for this purpose. Sometimes the Amsdos limit of about 120 characters for the expansion string buffer is a bit limiting, but this can be rectified by the small piece of machine code in Figure III which provides whatever size of buffer you want. This also can be incorporated in the basic loader described above. It is not a good idea to make the buffer larger than you really require, as it has the effect of reducing the size of the document which can be handled. Hopefully these examples and suggestions will encourage you to experiment and create your own special version of Protext, making it even more convenient to use and powerful than it is already. 10 buffsize=1000:REM set to the buffer size you want 20 MEMORY HIMEM-15:hn=HIMEM+1 30 FOR n=0 TO 15:READ dat$:P0KE hm+n,VAL("&"+dat$):NEXT 40 MEMORY HIMEM-buffsize:buffloc=HIKEM+1 50 CALL hm,buffloc,buffsize 60 DATA DD,6E,00,DD,66,01,DD,5E,02,DD,56,03,CD,15,88,C9Figure III: Routine to increase size of expansion string buffer David Foster, ACU #8703 ★ AMSTRAD CPC ★ DOWNLOAD ★ |
CPCrulez[Content Management System] v8.7-desktop/c Page créée en 195 millisecondes et consultée 2612 foisL'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko. |
|
|
|