SB BBC @ GBR Oldie hints/tips #194_195 Hints and tips from the archives of Wakefield BBC Micro User Group... 194. Making the most of VIEW (2) by Andrew G8YHI ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Following on from the last tip we can use the macro to make the sending of standard but personalised letters a little easier. View allows up to 10 parameters to be passed to each macro and within these parameters we can introduce the words that make each document different. Suppose we wished to send a number of letters of thanks in which the different wording was the persons name, their address and the amount of money they had sent. We first have to define our standard letter as a macro but where each of the different words or groups of words appear we insert a symbol. Each of these parameters, as they are known are given symbols from @0, @1 etc ...up to @9 and so our letter might look like this. DM AA @0 @1 @2 Dear @3, Thank you for your kind donation of `@4 in response to my recent begging letter. The villa in Marbella will do my sick grandmother the world of good. Yours sincerely, EM We now list the parameters as we wish them to be printed with each parameter separated by a comma, the macro name (in this case AA) being inserted in the margin using the EDIT COMMAND key. AA 1 Sandal Lane,Wakefield,WF4 5AF,Mr Sperry,25.00 AA 24 Ferry Drive,Wakefield,WF5 2AZ,Mr Woolhead,2.00 AA 16 Sunset Boulevard,New York,NY 13245,Mr Lane,0.50 When the documents are printed the parameters will be inserted in the appropriate positions. All parameters must be entered on one line (which can be up to 132 chracters long) and if any parameter includes a comma, the parameter must be enclosed within angle brackets. This is a useful but limited facility in that although text is inserted, the document is not reformatted before printing so careful thought has to be given to how each parameter will affect the final layout. Try it out and next I'll show you how to make the most of the function keys. de Andrew G8YHI 195. Making the most of VIEW (3) by Andrew G8YHI ~~~~~~~~~~~~~~~~~~~~~~~~~~~ One of the nice things about View is that in common with Wordwise+ the most used editing commands are available from the function keys, either on their own or in conjunction with SHIFT or CTRL. But unlike Wordwise Plus there is no mention in the manual of how to program the function keys yourself and yet the facility is available, albeit after entering *FX228,1 and by using the function keys in conjunction with CTRL and SHIFT. The facility is available from both command and edit mode and so might be used to insert often used phrases. eg *KEY0 COUNT |M or *KEY1 Wakefield BBC Micro User Group|M The keys can also be programmed to insert View's stored commands, which means that some quite complex composite commands can be created. To do this we need to know the Ascii codes for the View function keys and the characters for the definitions that will produce them. Placing |! before a character adds 128 to its Ascii value and a '|' before a character reduces its Ascii value by 64. As an example the View stored command EDIT COMMAND has an Ascii code of 164 which corresponds to |!$. The |! adds 128 to the Ascii value of 36 for the $ character which adds up to 164. The codes for all the View stored commands are set out on the next page. f0 f1 f2 f3 f4 -------------------------------------------------------------- Delete Next Formatting Justify Insert/ Block Match Overwrite Ctrl 172 |!, 173 |!- 174 |!. 175 |!/ 176 |!0 ____________ ____________ ____________ ____________ ____________ Move Swap Margins Delete up Highlight Block Case to char. 1 Shift 156 |!|\ 157 |!|} 158 |!|^ 159 |!|_ 160 |! ____________ ____________ ____________ ____________ ____________ Format Top Of Bottom Of Delete End Beginning Text Text Of Line Of Line 140 |!|L 141 |!|M 142 |!|N 143 |!|O 144 |!|P ____________ ____________ ____________ ____________ ____________ f5 f6 f7 f8 f9 -------------------------------------------------------------- Ruler Split Join Mark As Line Lines Ruler Ctrl 177 |!1 178 |!2 179 |!3 180 |!4 ____________ ____________ ____________ ____________ ____________ Highlight Go to Set Edit Delete 2 marker marker Command Command Shift 161 |!! 162 |!" 163 |!# 164 |!$ 165 |!% ____________ ____________ ____________ ____________ ____________ End Of Insert Delete Insert Delete Line Line Line Character Character 145 |!|Q 146 |!|R 147 |!|S 148 |!|T 149 |!|U ____________ ____________ ____________ ____________ ____________ Other useful commands are; 136 |!|H ESCAPE 137 |!|I RETURN 138 |!|J DELETE 139 |!|K TAB 152 |!|X Left arrow 153 |!|Y Right arrow 154 |!|Z Down arrow 155 |!|[ Up arrow 167 |!' Copy current ruler to cursor 168 |!( SHIFT 169 |!) SHIFT 170 |!* SHIFT 171 |!+ SHIFT < Up Arrow > Try and work out some useful definitions. Here are a few suggestions to get you started. *KEY 0 PO Box65 |!$ RJ |M |M Wakefield |!$ RJ |M |M WF2 6YZ |!$ RJ |M| ( Inserts address, EDIT COMMAND, Right Justify, Next Line etc) *KEY 1 ...>.............*.......................*.....< |!4 |M| ( Insert ruler details, MARK AS RULER, Next Line ) NOTE:- For 160 (highlight one) the |! is actually |! followed by a space. Not easy to show! 73 Rick G4BLT @ GB7WRG