home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_10
/
issue_07
< prev
next >
Wrap
Text File
|
1997-08-11
|
20KB
|
455 lines
Hints and Tips
10.7
Abbreviations in PipeDream Ö I run a sales system in PipeDream. One
of the features is that we can type a short name into the first
column of the sales sheet. If it finds the short name in the first
column of the address list, it replaces it by the expanded full name.
So, if I typed in ÉNCSæ, PipeDream would recognise this and replace
it with Norwich Computer Services. The formula is:
10.7
if(type(lookup(B195,[Addresses]C$1C$1000,
[Addresses]C$1C$1000))=öerrorò,set_value(B195,lookup(B195,
[Addresses]A$1A$1000,[Addresses]C$1C$1000)),öOKò)
10.7
Once the full name has been inserted, the formula returns OK. If the
short name doesnæt exist, then an Éerroræ is given. This is very
useful Ö it also shows that the customer exists in the database and
has been accepted.
10.7
Richard Torrens <4qd@argonet.co.uk>
10.7
Command line made easy Ö In Archive 10.6, öMultitasking Made Easyò,
David Wild referred to the difficulty of invoking applications from
the CLI.
10.7
There are two ways to make life easy for CLI users:
10.7
Å put frequently used commands in the Library (this is usually $.
!Boot.Library for a RiscPC)
10.7
Å use aliases (set Alias$...)
10.7
The latter is used by WIMP apps to record how to do certain actions.
It can also be used in RISC OS without any additional software to
make shortcuts for CLI users.
10.7
As I use several systems at work, I often type the Éwrongæ command
when I change systems. Under RISC OS this is no problem, I simply
Alias$ the foreign string to the local one. For example:
10.7
set Alias$ls : cat
10.7
so if I have been overdoing the UNIX during the day, it still works.
Simple!
10.7
Peter Chambers <peter@hightown.demon.co.uk>
10.7
Creating a font table Ö I have created a file using TableMate
Designer (v4.01a) showing a table of the keyboard ASCII numbers and
the characters they produce for a given font. The file is included on
this monthæs disc.
10.7
The default is Trinity.Medium, but by the use of the TableMate style
options, you can change the font to any other font, and the character
set will be changed and displayed in the appropriate column.
10.7
To alter the style, first you have to enter the Edit Style option.
You can do this either through the standard RISC OS menu options, or
by <ctrl-f6>. From this window, you click on the Name pop-up button,
and from the options that appear, select FontDemo. Then you repeat
the process for the Font Name. The list of fonts that appears from
this menu will depend on the fonts currently installed into your font
manager. The only part that you have to change manually is the Font
Name in the Header line.
10.7
At any time, the table can be printed, saved or exported to Draw, CSV
or even HTML File formats. If you save the table out as a drawfile,
you can then load it into CCæs ArtWorks where you can create some
unusual graduated cell backgrounds within the table. However, before
you do this, make sure you are 100% happy with the rest of the table,
and save it as a TableMate file because Draw/Artworks files cannot be
reloaded into Tablemate.
10.7
(If you donæt have Tablemate, you can load the drawfile version Ö
also on the monthly disc Ö and Select All, StyleÖFont name and select
the font you want. Thatæs OK unless you want to display something
like Dingbats Ö the ASCII numbers all turn into Dingbats, so you
canæt see whatæs what! Ed.)
10.7
Jonathan Frankl, Bradford
10.7
Creating neat screenshots Ö If you are using the screen-grab facility
in Paint, to capture part of the screen Ö one or more windows Ö then
you get a much neater result if you open a blank (white) Edit window
or Impression window, and then arrange the windows to be grabbed in
front of that. It means that you get a nice clean white border around
the windows Ö much neater for an illustration in Archive!
10.7
Ed. <paul.NCS@paston.co.uk>
10.7
Deleting text from writable icons (10.6 p.23) I have been using the
IClear module until recently but found that it interfered with some
applications such as Impact and a simple banking program (Illegal
window handle type errors). So now Iæve used Keystroke to give a
<ctrl-U> when I hold <alt> and click <select> in the icon. I find
this even easier than IClear.
10.7
(Keystroke is GREAT, but itæs a pig to know how to set things up. I
tried to set up <alt>-<select> but failed, so I asked Alan to
explain. Ed.)
10.7
I achieved it with just one operation. I opened a Keystroke window as
usual and ensured it had the focus. I held down <alt>, and clicked in
the top RH box with <select>. ÉAltæ blacked out at the top of the
Keystroke window, and ÉSelectæ showed in the top RH box. I then chose
ÉInsert textæ and simply put |U in the writable icon labelled Étext:æ
and pressed <return>... ...and thatæs it Ö just a one-page Keystroke
macro! Now I simply place the pointer in a writable icon, hold down
an <alt> key and click <select>. Any text in the icon is immediately
cleared.
10.7
Alan Gentle <alang@parkside.zynet.co.uk>
10.7
File download with ANT Suite Ö In the January Hints and Tips (10.4
p29), Paul suggested creating a dummy email in ANTæs Marcel in order
to fetch deeply-buried files from an FTP site.
10.7
An alternative method is to add the FTP URL to the Hotlist. If the
FTP client is not loaded, the Hotlist will call upon Fresco in
preference.
10.7
In addition, any FTP URLs in the Hotlist are also available from the
list in the FTP client öConnect...ò window. Any extra path
information supplied in the URL appears in the öDirectoryò field.
10.7
Nick Chalk <nickchalk@enterprise.net>
10.7
Fractions Ö I read Gerald Chandleræs column on fractions (10.6 page
75) with great interest, but from a different perspective. I enjoy
fractions Ö they remind me of a time of quality in engineering, of
leather aprons and craft workshops. Brilliant! So when I read of the
problem, I thought that there had to be a better way (or rather
another way). I thought that most people would not want to be limited
to a few specialised fonts, so this is my suggestion.
10.7
I think that the way forward is to use one of Geraldæs early
suggestions, namely that of adjusting the super- and sub-script
options and to adjust the kerning to give you the characters you
require.
10.7
The problem, as was quite rightly pointed out, was the vast number of
keystrokes required to get to the finished result. A lot of
keystrokes?... ...call for Keystroke!
10.7
I suppose most of you know of Keystroke from Quantum Software. This
brilliant utility allows you to automate your keyboard so that with a
touch of a key, dozens of things can happen, menus open, text gets
typed in, windows moved, almost anything and setting it up is so
easy. In fact, I have to say that there has not been a repetitive job
I ever come across that !Keystroke couldnæt handle Ö it has saved me
hours and hours of work. Enough of the advert, if you donæt have
Keystroke then get it Ö you wonæt be sorry. Still, if you remain
unconvinced you can have a bit of it for free! Read on...
10.7
The requirement is to type in a long series of commands to your
wordprocessor to get your text displayed correctly. In Impression,
the commands needed to type in one eighth would be something like:
10.7
{Ö50 }1/8
10.7
A space after the final is important. It produces: 1/8
10.7
Fortunately, Stuart at Quantum (home of !Keystroke) has written a
little basic program that will effectively Étype inæ any text you
like. The program (called Sendtext) is distributed with !Keystroke
(in the !KeyLib) and (with any luck) will be distributed on this
monthæs magazine disc.
10.7
You could use the program from an obeyfile using something like :
10.7
<Obey$Dir>.Sendtext {Ö50 }1/8
10.7
You could then have obey files for each fraction. Every time you
wanted a fraction then all youæd need to do would be to double-click
the obey file.
10.7
Even neater would be to use Dave Thomasæs excellent !Makro. The copy
Iæve sent to Paul is all set up and ready to go. If you use it, drop
a line to Dave and tell him how good it is, heæs a good chap and we
all do better with a bit of encouragement.
10.7
So there you go Ö easy fractions in any font at the click of a
button. By the way, when I asked Stuart if I could use his software
like this, he had no hesitation in agreeing. Thanks, Stuart, on
behalf of all Archive readers!
10.7
Bob Harding, 40 Bremhill, Calne, Wilts. SN11 9LD. <rharding@argonet.
co.uk>
10.7
Impression background printing Ö To print from Impression in the
background, save the document, quit it from memory, then drag it onto
the printer icon on the iconbar.
10.7
Frank Jukes <frank@fjukes.demon.co.uk>
10.7
Impression centring graphics Ö Now I know this may seem obvious to
some of you, but youæd be amazed at the number of articles I get with
graphics centred by eye, with spaces. The first essential is to know
about embedding a graphic in the text. This can be done by dropping
it in, or by copying it with <ctrl-C> and pasting it with <ctrl-shift-
F>. So, to centre a graphic, press <return> at the end of the
paragraph below which the graphic is to go so that the cursor is on a
blank line between the two paragraphs. Now press <f6>, and the cursor
will move to the centre of the page or column. Now drop the graphic
in there, or paste with <ctrl-shift-F>.
10.7
Ed. <paul.NCS@paston.co.uk>
10.7
Midi voice tables Ö In my beginnersæ article öMidi For The Massesò
(10.3 p28), I referred to tables detailing the 128 voices of the
General Midi set. These should relate easily to the software patches,
as used with ReMIDI, where the patch filename is abbreviated and its
meaning probably not obvious to the beginner. The tables were not
actually printed with the article Ö no doubt due to limited space Ö
although the TableMate-3 and Drawfile versions were included on the
subscription disc. Non-disc subscribers, however, would have been at
a disadvantage. Also included is a table of the General MIDI
Percussion Drum Set along with their pitch identification.
10.7
I hope readers will find these of interest.
10.7
Colin Sutton, Bradford
10.7
Multitasking made easy Ö Like David Wild (10.6 p57), I often want to
run a program in background in its own task window which I can
subsequently scroll. Here is another, quick way of doing it.
10.7
1. Use your text editor (Edit etc) to create an obey file, and enter
the one-liner:
10.7
*TaskWindow Ödisplay Öquit
10.7
2. While holding down <shift>, drag the file you want to run so that
the complete path name follows after the Öquit parameter.
10.7
3. Save this obey file with a name such as öDOITò.
10.7
4. Double-click öDOITò, and your program will run in the background
in its own task window.
10.7
The parameters are optional:
10.7
-display opens the task window, which will open anyway if the program
puts anything out to the screen
10.7
-quit finishes the task without the option of running another task in
that same window.
10.7
Sherwin Hall <100101.3577@CompuServe.COM>
10.7
Printers on the iconbar Ö I stopped using TurboDrivers when I fitted
the StrongARM, primarily because Computer Concepts were so slow in
sending out upgrades, and have only just installed it. Eventually,
one tires of waiting for !Publisher to complete printing under the
Acorn printer driver Ö even with version 1.54 and Ébackgroundæ
printing enabled.
10.7
When I had finished using the !Install program, I double-clicked on
!Printers in Resources:$.Apps. I then dragged two copies of the
DeskJet printer driver to the Printer control panel (IconBar
Menu/Printer control... ) and configured them, one for high
resolution (300╫300) and the other for draft (150╫150) printing. At
this stage, I found that I had six printer icons on the iconbar. From
left to right, there were the original pair of DeskJet icons (same
functions as the new Turbo Icons), one for the dot-matrix printer,
one for printing to send by ArcFax, and the two new Turbo icons. It
was easy to switch off the two old DeskJet icons (iconbar
Menu/Printer control... /Menu/Inactive), but this left four icons in
an unfamiliar order.
10.7
(At this point you may be wondering why I was not simply upgrading
the old, already installed version of TurboDriver I had used with the
ARM 610.) Well, it may have been that it was version 4.04. At a more
practical level, the earlier installation was lost in a hard disc
crash.
10.7
To achieve the desired arrangement, the obvious course appeared to be
to öRemoveò those icons at the left which I wanted to be at the
right, then re-install them by dragging the printer definition files
back into the Printer control panel, and go through the process of
configuration again. Was that tedious process necessary? I chose to
do it another way.
10.7
The file ÉSettingsæ (<HardDisc>.$.!Boot.Choices .Printers.Settings )
contains the information relating to the printer icons on the
iconbar. A little study shows the structure of this file. If you load
it into Zap (or Edit, if you must), you will see a long series of
identifiers down the left hand edge of the window; each consists of
two lower case letters followed by a colon followed by a space. In
many cases, these identifiers are followed by a string of characters,
some of which are intelligible words.
10.7
The start of the file is identified by Éfv: æ. Each section relating
to an individual printer icon is not indicated by any clearly evident
delimiters. It is necessary to find Écl: æ and Éic: æ which are the
start and finish lines for each printer.
10.7
Make a copy of the file ÉSettingsæ (as ÉSettingsOæ, or some such)
before starting to reorganise the listing in ÉSettingsæ. Select all
of the lines of the section (æcl: æ to Éic: æ) representing the
printer icon that you want at the left hand end of the group on the
iconbar and move these to immediately below Éfv: æ by pressing <ctrl-
V>. In the same way, you can rearrange the section of lines relating
to each of the other settings. Beware of leaving totally blank lines
in the file, and ensure that one line-feed follows the last line
starting Éic: æ. Save the reorganised ÉSettingsæ, quit !Printers and
re-run it. Hey, presto!
10.7
It is easier to do it once you see the file and its identifiers, than
it is to describe it . With the exception of the time it took me to
understand the structure of the file, it took less time to rearrange
the icons this way than using the ÉRemove/Drag in/Configureæ method
described earlier.
10.7
Of course, someone will now tell me of an easier, quicker way!?
10.7
Frank Watkinson <frank@watsnees.demon.co.uk>
10.7
Zap and Basic Ö Here are some hints to remedy some of the obscure
bugs in the latest version of !Zap editor (version 1.35).
10.7
Failing Basic programs Ö One of the obscure bugs that !Zap has is
that any trailing spaces on a Basic line are not removed. This can
cause your program to behave very strangely, and output unexpected
results. Under many circumstances, the Basic interpreter will ignore
trailing spaces on a Basic line, except in the following case:
10.7
1. After the keyword OF in a öCASE .... OFò structure. The OF keyword
must be the last keyword on the line. The interpreter will give the
error: öCASE..OF statement must be the last thing on a lineò.
10.7
2. After the keyword THEN in a multi-line öIF..THEN..ELSE..ENDIFò.
The Basic interpreter will not be able to detect the trailing space
and will convert the multi-line IF...ENDIF into a single line IF
THEN. The Basic interpreter will not trap this error. Your program
will behave differently from what you had expected. It could take you
ages to discover what is happening because you canæt see the space
after the THEN keyword!!!
10.7
One solution I found is to save the file, open it in Edit, then save
it back again. Edit and other Basic editors will remove trailing
spaces on a Basic line.
10.7
Basic mode, Copy and Move bugs Ö This bug is easily encountered. You
can lose your program if you donæt read on.... !Zap allows you to
position the cursor (using the mouse) on a line that is below the
last line of the Basic program. This is normally an empty line
without a line number. If you press <enter> or just type in
something, !Zap will automatically put in a new incremented line
number on the left hand, and your typed text appears on the line. So
far, all is fine. However, if while the cursor is on the blank line,
you highlight something from somewhere else in the program and copy
it or move it to the blank line, !Zap goes crazy. It will first show
a wrong line number, and only part of the copied text will appear on
the line. This new line is now a garbage line. You cannot move the
cursor beyond it. You will not be able to delete this line. Most
importantly, if you want to save your file, Zap will report an error
öNot a Basic file or corrupt at offset &xxxxxxxò, and you will not be
able to save your file.
10.7
For example:
10.7
10 DIM memory% memory_size%
10.7
20 memory_pointer% memory%*4
10.7
30 byte% !memory%
10.7
The above is only a 3 line program, but you can place the cursor
using the mouse on the fourth line (i.e. the blank line). Now
highlight line 20 until the number 4 (do not highlight the complete
line only the text) and copy it using <ctrl-C> to the blank line.
Surprise!! The line number will be shown as 110053. The first two
chars of the variable memory_pointer% disappear. You are stuck.
10.7
10 DIM memory% memory_size%
10.7
20 memory_pointer% memory%*4
10.7
30 byte% !memory%
10.7
110053 ory_pointer% memory%*4
10.7
What happens, is that there is a bug with the copy and move commands.
When !Zap copies or moves a line in Basic mode, it assumes that you
are copying or moving to an already existing line. In the above
example, what we are doing is trying to append something to the end
of the program, using the copy command, which unfortunately does not
work.
10.7
The strange line number and the missing three characters from the
variable are due to the fact that !Zap places the first three
characters of the variable name as a three-byte tokenised line
number. Worse still, this new line does not have an &0D terminating
byte! Thatæs why you cannot move beyond it.
10.7
To remedy the situation and regain control of your valuable program:
10.7
1. Place the cursor after the last character on the last line (the
problematic line). In our example, after the digit 4.
10.7
2. Switch into Byte mode using <ctrl+shift+f2>.
10.7
3. Type ö0ò followed by öDò. (i.e. insert a terminating byte).
10.7
4. Switch back to Basic mode using <ctrl+shift+f6>.
10.7
Now you find yourself after the problematic line. Now just press
<Enter>, and Zap will automatically re-number the program for you and
you are back in control. Donæt forget to type the missing characters
on the line.
10.7
Basic tokenising bug Ö When copying or moving in Basic mode, Zap does
not automatically tokenise the new copied text.
10.7
Example:
10.7
10 mem% 2 :REM PRINT mem%
10.7
20
10.7
30 pointer% 1<<10
10.7
If you copy or move the öPRINT mem%ò after the REM in line 10 to line
20, the öPRINTò keyword will not be tokenised. This will cause the
program to produce errors when executed. To remedy this, after
copying, place the cursor on the line (line 20 in our example) and
insert a space, or whatever.
10.7
Applications not accepting Zap Basic files directly Ö You can save
(drop) a Basic file directly into another Basic editor like DeskEdit,
StrongED or Edit, but they will not accept Basic programs directly
from !Zap. You have to save them first to disc then load them into
the other application or Editor.
10.7
The reason for this is that most applications identify a Basic
program by checking for the byte &0D to be the first byte of the
Basic program. If it does not exist, they will report a öBad Basic
programò.
10.7
While in Zap Basic mode, your program is stored using a special Zap
format, not the standard Basic tokenised file. The format Zap uses is
as follows:
10.7
1. 3-byte line number (similar to the 3-byte-encoding used by GOTO).
10.7
2. The Basic line content in a Basic tokenised form.
10.7
3. One byte terminator (&D).
10.7
You are warned Ö if you drop your Basic file directly into Edit
(version 1.44), Edit will crash with a Data Abort error!! So, save
your program to disc first, before loading it into other applications.
10.7
Mohsen Alshayef <mohsen@qatar.net.qa>