home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_10
/
issue_02
< prev
next >
Wrap
Text File
|
1997-08-11
|
15KB
|
360 lines
Hints and Tips
10.2
Acorn Toolbox from Assembler Ö Using the Acorn Toolbox from Assembler is
easy Ö even easier than from ÉCæ. Writing a WIMP application in
assembler must now be about as easy as it can ever get.
10.2
By way of a demonstration, the !SoundTest application on this monthæs
disc assembles to less than 900 bytes and will run in a 2Kb wimpslot,
even though it supports an iconbar, a menu, info window, and a window
with three sliders, three display fields, a stringset and a button. Oh,
and of course thereæs interactive help everywhere as well!
10.2
The header file defines the data areas required. The toolbox needs two
additional data areas Ö IDBlock which returns information about where
events have occurred, and FileDescriptor which holds information about
the messages file.
10.2
Initialisation is straightforward. The WimpSlot size is checked, data
initialised, and then a call to Toolbox_Initialise:
10.2
Setting r2 to zero ensures that the only Énormalæ wimp message returned
is Message_Quit. All other messages returned will be toolbox events, and
a pointer to a null terminated list of the required events is passed in
r4. Registers r5 and r6 point to FileDescriptor and IDBlock
respectively.
10.2
The program then falls into a standard Wimp_Poll loop. If the message
returned is a toolbox event, the program looks up the event in the list
that was passed to Toolbox_Initialise, and then jumps to the associated
handler.
10.2
Handling the events is very similar to pre-toolbox programs, except that
an abstract handle is returned in the IDBlock rather than the actual
window/icon causing the event.
10.2
The trickiest part is initialising gadgets before theyære displayed for
the first time. This is achieved during the Toolbox_ObjectAutoCreated
event, when we can check the name of the object raising the event Ö
i.e.áöIconbarò, öMenuò, öProgInfoò or öWindowò in this case.
10.2
Dave Appleby, York
10.2
Alternative wastebin Ö I used to use a PD wastebin application, but
always begrudged the space on the iconbar. So, when I found it was
clashing with another application, I binned my bin.
10.2
As a very effective alternative, I now use a directory on my hard disc
that is called up onto my desktop at boot-time, occupies very little
space, and makes a very effective waste bin. I start it up with:
10.2
Filer_OpenDir scsi::SQ270.$.zzz 2348
10.2
1160 166 186 -sd -si
10.2
This ensures that, whatever I have as the current filer display
settings, this particular directory has small icons (si) and is sorted
by date (sd) That means that the latest file created is at the top of
the directory and hence easily visible, despite the tiny size of the
filer window allocated to it.
10.2
So, to delete a file or directory, I shift-drag it into zzz and then
when, finally, it tells me the directory is full, I open it up and
delete the lower two-thirds of the items (sorted by date, remember).
Itæs simple but effective.
10.2
I use a similar startup for my RAMdisc:
10.2
Filer_OpenDir RAM::RamDisc0.$ 1860
10.2
1156 134 156 -sd -si
10.2
I actually use this more for my temporary files than the zzz directory Ö
because it empties automatically on switch-off!
10.2
Ed <paul.NCS@paston.co.uk>
10.2
Compression with the PC card Ö Aálot of people seem to be having trouble
using DoubleSpace and DriveSpace. These compression utilities work by
compressing the data written to your hard disc Éon the flyæ, so it
appears that your data is written normally when in fact it isábeing
stored in a highly compressed format.
10.2
The compressed data is actually being stored in a very large hidden file
(called drvspace.001) which resides in the root directory of your PC
partition.
10.2
The problem with this method of compression is that if this drvspace.001
file is accidentally deleted or corrupted, youæve lost all of your data.
The chances of this happening, however, are about the same odds as your
hard discs crashing which, in the long run, are very slim.
10.2
There is no incompatibility that I know of, but because the program is
not being run on a 100% compatible PC, there could be complications. The
most reliable way of running DriveSpace is under Windows 95. To be even
more secure, there is a version on the MS Plus pack for Windows 95
called DriveSpace 3.
10.2
If you really want to be on the safe side, stick with good old PKZIP.
With this, you can create nicely packed ZIP files with the ability to
access them with SparkFS.
10.2
Anthony Wheeler <tech.NCS@paston.co.uk>
10.2
DOS files from the PC card Ö I received two responses to my plea for
help (9.12 p27).
10.2
First of all Dennis Aldcroft very kindly explained how I can actually do
this with PCExchange, although it is a bit of a fiddle. Basically,
Windows is loaded and then you go into DOS from there, save your file to
a floppy disc, which is then re-accessed from within Windows and saved
to the ClipBoard by associating the file to the Windows Notepad. PC
Exchange can then be used as before.
10.2
Secondly, Jim Nottingham offered a simpler approach: save any DOS file
to the hard disc, and then Éfreezeæ the PC card. This does not interfere
with the application running in DOS but allows the file to be accessed
from within RISC OS by opening up the PC hard drive directory. Once the
file is found, it will need to have its type set to ÉTextæ, and it can
then be moved or copied to any RISC OS application.
10.2
I am very grateful for these tips, and pass them on in the hope that
they might be useful for others.
10.2
Colin Randall <carandall@argonet.co.uk>
10.2
Double-click-hold Ö Alisdair McDiarmid (10.1 p18) points out a feature
of Larger, whereby if you double click and hold on a file, it is treated
as if shift were held down. Anyway, StrongED also provides this feature,
and jolly useful it is too! The latest version of StrongED (4.14 at the
time of typing) can be downloaded from:
10.2
http://login.eunet.no/~guttorvi/strong.html
10.2
Ian Clark <se96ic@dmu.ac.uk>
10.2
EasyFont3 Ö When using EasyFont3, if you load an Impression file and get
a Éfont not foundæ message, drag the file onto Easyfont3, and the fonts
will be loaded and drawn, with no need to reload the file.
10.2
Robert Lytton, Leeds
10.2
Large Impression files Ö If you have a large Impression file and a large
amount of memory, Impression will try to load as much as possible into
memory. Most can then be removed by using ÉMinimise memoryæ (if it is a
document and not a file) but this process can take time when using 8Mb
on an older machine! By creating a RAMdisc to use up most of the surplus
memory (click <select> on Acorn, to bottom of Task window, click and
drag out a red bar ÉRAMdiscæ) less of the document will be able to be
loaded and so loading will be quicker! You can then menu ÉQuitæ the
RAMdisc to reclaim the memory.
10.2
Robert Lytton, Leeds
10.2
MoirΘ patterns on scanning Ö In last monthæs Help!!!! feature (10.1
p41), John Molyneux described how he used ImageMaster to minimise MoirΘ
patterns when using his Mustek scanner. There is a more Éscientificæ way
that I used with my Epson that ought to work with his scanner too:
10.2
1) Scan at high resolution, ideally the highest true resolution of the
scanner.
10.2
2) If there is MoirΘ patterning, set ImageMasteræs Alias Filter to
ÉLanczosæ. (Iconbar menu, use Choices.General, then set and OK or Save)
10.2
3) Resample (ImageMasteræs main menu, use Edit.Scale then click the
Resample radio icon, set to 90/90 and Click OK).
10.2
After a few seconds delay, even the worst MoirΘ patterning will entirely
disappear.
10.2
It appears to be necessary to Resample with a fairly wide variance from
the original scanning resolution. The closest numbers I have found
satisfactory have been: original scan at 600 dpi and resample at
200ádpi.
10.2
It is worth experimenting with a variety of numbers. The MoirΘ
patterning isnæt just reduced when this technique is employed Ö it
totally disappears and the improvements can be truly amazing.
10.2
Malcolm Knight <malcolm@digidark.demon.co.uk>
10.2
OCR Ö If you wish to use OCR with a Scanlight Professional, I have found
Sleuth2 works very well when using Twain set with maximum brightness.
Before, I used Sleuth1.5 which did a poor job and Iáhad trouble
preparing dark enough scans from the scanner.
10.2
Robert Lytton, Leeds
10.2
PC partitions Ö While I was working at NCS, a number of PC card users
called to ask how they could create more space on their Édrive_cæ
partitions. Attempts to copy DOS/Windows system files to another
partition and recreate drive_c, invariably end in tears and hair loss.
10.2
To make life easier, the !PCConfig application allows you to create a
second partition, called drive_d. You create this in the same way that
you created the first drive_c partition, and DOS and Windows identify it
as drive ÉDæ.
10.2
We recommend that you keep DOS and Windows on drive_c, making sure that
there is a little spare capacity, and create a drive_d on which you then
keep your applications and data. You should allocate around 25-30Mb for
DOS and Windows on drive_c.
10.2
Richard Hesketh <NJ108@lamp.ac.uk>
10.2
Printer driver problems Ö Some months ago, I read a article about
difficulties using !Printer 1.52 regarding a problem about page-formats
when using a image-setter.
10.2
Iæve installed version 1.53 on a RiscPC connected to an image-setter,
and the problem disappears if you proceed as follows:
10.2
Define a page-format in the printer driver of a size 10╫10 mm Ö
obviously too small for all your documents.
10.2
Configure your PostScript driver to use this page-format. When using
ArtWorks, be sure that ÉSet page formatæ is on. When using Publisher,
the program will complain about the small page size. Click OK and not
Cancel.
10.2
If you use landscape and portrait the correct way, you can save a lot of
bromide/film. Another advantage is that you never have to select a page-
format again in your printer driver.
10.2
I donæt know what happens in other programs like Ovation Pro because I
donæt own this program (yet).
10.2
Martijn Claassen <martijn.argos@pi.net>
10.2
RiscPC special characters Ö In Archive 6.3, Gabriel Swords produced a
very useful display showing where the special alt-characters are on the
Archimedes keyboards. I have updated this for the RiscPC keyboard.
10.2
Eddie Lord <72046.251@CompuServe.COM>
10.2
(Thanks, Eddie! I find it most useful. I keep it above my desk. Iæve put
both that drawfile, and the original Archimedes one, on the monthly
program disc. Ed.)
10.2
Tablemate and OLE Ö When using a Tablemate file and Impressionæs OLE
feature, the tablemate file is exported as a drawfile. If you save the
file and change the filetype to öBCFò or ötblmateò you can then reload
it into Tablemate to edit it before dragging it back into your
Impression document.
10.2
Robert Lytton, Leeds
10.2
TechWriter tips Ö Here are a number of tips from Jim Lesurf. If you have
any more, please send them in to Jim.
10.2
Extending Ésmart quotesæ Ö Versions 2.17 and later of TechWriter Pro
(and recent editions of EasiWriter) offer Ésmart quotesæ and these are
jolly useful. One tap on the ` key gives É, two gives ö, three gives `
itself. Similarly, one tap on É gives æ, two ò, and three gives æ
itself. If you donæt like this feature, you can turn it off. Load the
Messages file into a text editor and find the lines:
10.2
x35:`Éö`
10.2
x35:ÉæòÉ
10.2
x35: denotes these triple action commands. The first character after É:æ
is the key it is assigned to, and the following three characters appear
on pressing that key once, twice or three times. Usefully, you can add
extra keys to this list. For example:
10.2
x35:ÿùÿ
10.2
x35:..╖î
10.2
Now theá-ákeyágivesá-á,áùáoráÿá, and the . key gives . or ╖ or î
(ellipsis). You can include up to seven x35 commands in the Messages
files, giving you access to up to 14 characters that are otherwise
awkward to get.
10.2
Print button-bar icon Ö The defaults on TechWriter (may work on
EasiWriter too) are, for me, the wrong way around. To swap the defaults
on the print icon, proceed as follows: Load the Resources file into an
editor and change the line
10.2
w1:icbr Isave!11 10,68,4
10.2
to
10.2
w1:icbr Isave!11 68,10,4
10.2
This swaps the actions of select and adjust on this icon. If you look at
this file, you can see that the other button-bar icons work in a similar
way and, if you want, you can fiddle around with them, too. However,
proceed with care!
10.2
Stationery and default choices Ö When using TechWriter (may work on
EasiWriter too) I keep myástationery in a directory called Stationery
inside !TechWriter. To tell the program where it is, Iáinclude a line in
the !Run file:
10.2
Set TechWriter$Path <TechWriter$Dir>.Stationery.
10.2
(Note the trailing full stop.) This command sets a path.
10.2
You can then tell TechWriter which piece of stationery to use by default
by adding the É-uæ switch to the run command at the bottom of the run
file, e.g. in my case this reads Run .!RunImage %*0 -d -ustyle_def -
r1600, so my default stationery is the file Éstyle_defæ inside the
!TechWriter.Stationery directory.
10.2
Other useful switches: the É-r1600æ switch tells TechWriter to keep the
current document wholly in memory unless it gets bigger than 1600Kb.
i.e. it sets the file size below which TechWriter avoids any disc-
swapping and keeps the current file Éclosedæ unless youære loading/
saving. You can use É-ræ to set any size you find convenient.
10.2
The -b switch followed by a font name, causes that font to be displayed
and printed Éback to frontæ. This is useful if you want to write in
languages like Hebrew which read/write from right to left. It means you
can mix a right-to-left language with a left-to-right one in the same
document and each will come out the correct way around.
10.2
The -o switch sets the Éeasy save directoryæ. That means it sets where a
file will be saved if you give a plain name (what Acorn call a
leafname). e.g. if you set this to
10.2
-oADFS::HardDisc4.$
10.2
and then save a file as fred it will be saved to the file
10.2
ADFS::HardDisc4.$.fred .
10.2
Modern Choices! Ö Acorn have decided that instead of putting default
settings in the run command of TechWriteræs (and perhaps EasiWriteræs)
!Run file, they should be saved in a ÉChoicesæ file elsewhere in the
machine. This is to facilitate the Net machines which have the
applications in ROM. Try looking for it inside !TechWriter or the !Boot
application on the main hard disc. Specifically, look for a file
!Boot.Choices.TechWriter.Choices. If it exists, it over-rules anything
you may set on the run line, so you should make any changes in the
!Choices file.
10.2
Jim Lesurf <jcgl@st-and.demon.co.uk>
10.2
The characters shown in bold are produced by pressing the relevant key
in conjunction with either the Alt key on its own or both the Shift and
Alt keys:-
10.2
e.g. to type ó hold down Alt and press the C key
10.2
to type ⌐ hold down Shift and Alt and press the C key.
10.2
The characters indicated by an arrow are intended to be used in
conjunction with other keys to produce accented letters; in each case
the accent is only produced if the Alt-key combination is followed by an
appropriate letter: e.g. to produce Θ you first type Alt-[ then type e.
If you want the accent on its own, follow the Alt-key combination by
pressing the spacebar.
10.2
Alt-<hyphen> produces a öhard hyphenò (character 173)
10.2
Alt-<spacebar> produces a öhard spaceò (character 160)
10.2