home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
fish
/
931-950
/
ff947
/
smaus
/
smaus.doc
< prev
next >
Wrap
Text File
|
1993-12-22
|
23KB
|
539 lines
Documentation
for
SMaus
Copyright © 1991-1993 Stefan Sticht
All rights reserved
Shareware
SMaus is shareware. SMaus is not freeware. If you use SMaus you
must register your copy.
Registration
To register your copy of SMaus print out the file named
"Registration", fill it out and send it to me along with an
euro-cheque, money order or cash. The registration fee is US
$5.-/DM 5.-.
No warranty
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS
IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAM), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
Distribution
You may copy and distribute verbatim copies of the program's
executable code and documentation as you receive it, in any
medium, provided that you conspicuously and appropriately publish
only the original, unmodified program, with all copyright notices
and disclaimers of warranty intact and including all the
accompanying documentation, example files and anything else that
came with the original. You may only charge a small fee for the
costs of media, handling and postage. SMaus may not be
distributed along with or as part of commercial products without
a license from the author.
SMaus_nowin is a special version of SMaus without a graphical
user interface. Everything said for SMaus applies to SMaus_nowin,
too.
Introduction
SMaus has been written to replace the commodity AutoPoint, which
is part of AmigaOS 2.0 and above. SMaus is highly configurable.
The primary purpose is to activate windows under the mouse
pointer. There are different actions which will activate a
window:
Mouse movement: while or after moving the mouse the window under
the pointer gets activated. You can select a speed below which
windows get activated. If you move the mouse fast, no window gets
activated. If you move the mouse slowly, the windows under the
mouse get activated. In the one extrem, windows only get
activated after you stopped the mouse movement. This helps
minizing the "jumping" of the pointer on 68000 based Amigas when
a window gets activated, because AmigaOS has to redraw the border
of the window which got activated and has no time left for moving
the pointer. After the border has been redrawn, the pointer
jumps. On faster Amigas, e.g. the A3000, the "jumping" is less
noticable, at least when you move the mouse slowly. On this
machines you can allow SMaus to activate windows at once, as long
as you move the mouse slowly.
Time: Unfortunately SMaus and Autopoint can't be informed by the
OS, if a new window or screen has been opened or the front screen
has been changed. Therefore SMaus and Autopoint always have to
look which window is under the mouse pointer after a certain
time. This technic is known as "polling" and must be avoided on
multitasking operating systems like AmigaOS. But as the window
under the mouse pointer should be active, SMaus for example has
to test if another window opened active and the window under the
pointer has to be reactivated, etc. With SMaus you can select the
time, after which SMaus tests this, or disable this option at
all. You may increase the timeout to minimize CPU usage. With the
additional option "Keypress" (described below) you may select a
great timeout without disadvantages.
Keypress: If you like it, SMaus activates the window under the
pointer at any key pressed.
Mousemovement by keyboard: SMaus recognizes mousemovements done
by keyboard using an Amiga key and the cursor keys. SMaus
activates the window under the pointer after movement.
Often it would be better not to activate the window under the
pointer. The following options disable the window activation
temporarily:
Window title: you can specify titles of windows, which are never
to be deactivated. You can use normal AmigaOS wildcards
therefore. Thus you can tell SMaus not to deactivate e.g. windows
called "System request" or "Arq", because you'd like to answer
this requesters with the keyboard immediately.
Screen title: like window titles, you may specify screen titles.
If the screen title of the frontmost screen matches, SMaus does
nothing on this screen.
System requesters: they don't get deactivated. This option
doesn't work with some requester replacements like "Arq".
Already active windows don't get activated again. SMaus has a
graphical user interface for easy configuration. You can save a
configuration and load it. SMaus has been programmed respecting
the rules of AmigaOS. No OS functions get patched. SMaus has been
programmed on an A3000 with SAS/C and has been tested with the
debugging tools Enforcer and Mungwall.
System requirements
SMaus requires at least AmigaOS 2.04, Kickstart version 37.175.
If you have Workbench 2.1, version 38.xx or better, you can use a
localized user interface. This means SMaus uses messages in e.g.
german language. SMaus will not work with AmigaOS 1.2 or 1.3.
Starting SMaus
Before you test SMaus, please make sure you're not running
autopoint at the same time. Remove autopoint by using the
Commodities Exchange utility provided by AmigaOS.
You may start SMaus either from Shell or by double clicking on
its icon. If you haven't changed any tool type in SMaus's icon,
double clicking on it starts SMaus and tells the program to open
its window immediately. As SMaus can't run twice simultanously,
because there's no sense in doing so. Starting SMaus twice will
tell the first running copy of SMaus to open its window. If you
want to start SMaus from the shell and be able to close the shell
afterwards, use
Run >NIL: <path>SMaus
to start it.
Now it's time to explain the various options:
Options
Activation Threshold:
With the top most slider in SMaus's window you can change the
threshold for the speed of mouse movement, above which windows
don't get activated at once. The speed of movement is measured in
pixel/event. Just test this: select a threshold of 0. Now move
the pointer across window borders. Nothing will happen. But if
you stop the movement, the window under the pointer gets
activated. Threshold 0 means: activate after movement. You might
prefer this on 68000 based machines. Now select a threshold of 2
and move the mouse very slowly across window borders. The windows
will get activated immediately. Now move the pointer fast over a
window without stopping in his boundaries. The window didn't get
activated. Why? Just increase the threshold and do it again. The
window got activated, if the threshold was big enough, but you
may have noticed this ugly "jumping" of the mouse pointer. On my
A3000 I prefer a threshold of 1.
Reactivate windows after:
The second slider determines the time, after which SMaus tests if
the window under the mouse pointer is still active. If it is
inactive, it will be reactivated. This timeout is measured in
1/10 seconds. 0/10 disables this feature. Default is 5/10
seconds, what means half a second. Increasing this value saves
CPU time. If you use the option "Keypress", too, you may increase
this value without any disadvantages.
Don't deactivate this windows:
In this string gadget you can specify titles of windows, which
are not to be deactivated. You may use normal AmigaOS wildcards.
Example: Arq#? doesn't disable windows with a title that starts
with Arq. For further information read the chapter about
wildcards in your AmigaDOS manual. Please note, that the
comparison is case dependant. Some more examples:
(Arq#?|#?estion#?) - all titles beginning with "Arq" or
containing "estion", e.q. question.
(#?[Rr]equest|Arq#?|#?[Mm]essage|Choose #?) - all titles, that
end with "Request" or "request", or start with "Arq" or "Choose".
If the pattern is not syntactically correct, e.g. a bracket
misses, SMaus will tell you this.
Do nothing on these screens:
In this string gadget you specify titles of screens, with
wildcards, as above. If the title of the frontmost screen matches
the contents of this stringgadget, SMaus does absolutely nothing.
Hotkey to open this window:
In this string gadget you put a description of the hotkey, which
shall open SMaus's window. Examples:
lcommand f1 - open window on left Amiga + F1
ctrl help - open window on ctrl + help key
SMaus uses commodities.library's input description strings:
Input description strings
With input description strings you can specify almost any input
action, for example the action lshift f1, that is pressing the
left shift and the f1 key together.
Input description strings have the following template:
[class] (([-]qual)|syn)* [[-]upstroke] [highmap|ANSIcode]
(* means: zero or more occurances of the expression in brackets)
class is one of the following strings:
rawkey, rawmouse, event, pointerpos, timer, newprefs,
diskremoved, diskinserted.
If not specified, the class is supposed to be "rawkey".
qual is one of the strings:
lshift, rshift, capslock, control, lalt, ralt, lcommand,
rcommand, numericpad, repeat, midbutton, rbutton,
leftbutton, relativemouse
A preceding '-' means that the value of the corresponding
qualifier is to be considered irrelevant.
syn (synonym) is one of the strings: shift, caps, alt
shift means "left or right shift"
caps means "shift or capslock"
alt means "either alt key"
upstroke (literally "upstroke")
if this token is absent, only downstrokes are considered
for rawmouse (mousebuttons) and rawkey events. If only
this is present, only upstrokes count. If it is preceded
by '-' both, up and down strokes, are included.
highmap one of the strings:
comma, space, backspace, tab, enter, return, esc, del, up,
down, right, left, help, f1, f2, f3, f4, f5, f6, f7, f8,
f9, f10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, (, ), /, *, -, +
ansicode a single character token is interpreted as a character
code, which is looked up in the system default keymap.
The names of the keywords above may vary in other versions of
AmigaOS or new descriptors may be added. SMaus will unterstand
them. Please consult your AmigaOS documentation.
Activate by mouse:
With this cycle gadget you select if mouse movements shall
activate the window under the pointer at all and wether mouse
movements shall activate normally or always. "Normally" means:
activate, if not the options "WindowNot" or "StringGadNot"
prohibit the activation. E.g. if a string gadget is active, no
window will be activated. "Always" means activate really always.
Activate by key:
When this option is enabled, SMaus activates the window under the
mouse pointer if you press any key of the keyboard.
Don't deactivate windows with active string gadget:
If you enable this, SMaus won't deactivate windows with active
string gadgets. Please notice, that this will not work correctly
if you specify a too small timeout for reactivation of windows,
because a program might open a window and before it could
activate the string gadget, SMaus may already have deactivated
its window.
Other gadgets
Hide:
This button or the close gadget or the ESC key close SMaus's
window without quitting.
About:
This shows you some information about the program.
Quit:
This button removes SMaus completely.
Menu
Configuration open/save:
With this two menu items you can save all your prefered settings
in a selectable config file or load a previously saved
configuration.
Installation
If you want to start SMaus any time you boot your Amiga, just
drag SMaus's icon to your WBStartup drawer. If you'd like SMaus
to use other languages, e.g. german, please read the chapter
"languages".
If you want to start SMaus in your User-Startup, add the line
Run >NIL: <path>SMaus <otions>
to it, after replacing <path> with the path to the SMaus
executable and <options> with your prefered options. Example:
Run >NIL: SYS:Tools/SMaus from s:SMaus.config
Tool Types
You may add the following tooltypes to its icon to configure
SMaus:
From=<filename> The name of a configfile to load.
The configfile will be read before
other tool types are parsed. So
tool types will overrule the same
options of the configfile.
CX_Priority=<num> The priority of SMaus in the list of
commodities.
CX_Popkey=<string> The input description string for the
hotkey.
CX_Popup If Smaus finds this tool type, it will
immediately open its window.
Timeout=<num> The prefered timeout for window
reactivation.
Threshold=<num> Threshold in pixel/event below which
windows get activated immediately by
mouse movement.
Priority=<num> The priority of the SMaus process.
If you use the option "keypress", the
priority gets automatically raised to
21.
WindowNot=<string> The pattern describing windows which
are not to be deactivated.
ScreenNot=<String> The pattern describing the screens on
which SMaus mustn't do anything.
Keypress Turn on activation by keypress.
MouseNever Turn off activation by mouse.
MouseAlways Mouse movements activate always.
NoStringGad Don't deactivate windows with active
string gadgetgs
Here's the template if you want to start SMaus from Shell:
CX_Priority/K/N,CX_Popkey/K,CX_Popup/S,Timeout/K/N,Threshold/K/N,
Priority/K/N,ScreenNot/K,WindowNot/K,Keypress/S,MouseNever/S,
MouseAlways/S,NoStringGad/S,From/K
As you see these options are the same as the tool types. Please
notice that you have to put double quotes around options,
which contain a blank. Example:
cx_popkey "ctrl f1"
Config file
SMaus's config file is an ASCII file, that means, you may create
and change this file with your prefered editor. Every line in the
configfile has to look like the options part if you start SMaus
from a Shell. Lines starting with ";" are treated as comments.
Example of a configfile:
---- beginning of file ----
; Comment
KeyPress NoStringGad
MouseAlways
Threshold 1
Timeout 10
ScreenNot "Post#?"
WindowNot "(Arq#?|#?equest #?|#?essage#?|System#?)"
CX_Popkey "lcommand control f2"
---- end of file ----
Please notice again the double quotes around options line
WindowNot. Please notice also, that saving the configuration
within SMaus creates a completly new config file. Comments in the
old config file will be lost.
SMaus_nowin
SMaus_nowin is a special version of SMaus without a graphical
user interface and without a window. If you're short on memory,
this version saves you some of it.
Languages
If you use Workbench V2.1 or higher, you have a library called
"locale.library". This library allows programs easy usage of
message catalogs in different languages. SMaus plus a german
message catalog makes a SMaus with a german user interface, with
german error messages etc. If you've got a message catalog for
SMaus in your native language, you can have SMaus using your
language. But these message catalogs must be created exclusively
for every program. The message catalog for SMaus is named
SMaus.catalog. Unfortunately I only speak German and some
English, so I can only provide you with a German message catalog
(the English message catalog is built in). But you may create a
message catalog for SMaus in your native language if you have a
software developing tool called "CatComp" by Commodore:
First create a directory Catalogs/<language> in SMaus's catalogs
directory. With
CatComp SMaus.cd CTFILE Catalogs/<language>/SMaus.ct
you make an empty translation file. Fill up the empty lines in
this file with the translation of the english messages below the
empty line. After this insert "SMaus.catalog" and the version
number 1.0 in the first line. In the third line you have to
insert the name of the language, as you can select it in the
prefs editor "Locale", e.g. français. With
CatComp SMaus.cd Catalogs/<language>/SMaus.ct CATALOG
catalogs/<language>/SMaus.catalog"
you create the message catalog for <language>.
If you have a message catalog for SMaus in a language you want,
you have to do this to make SMaus use this catalog.
First, you have to choose the language as the prefered language
in the preferences editor Locale.
Second, locale.library must be able to find the file
SMaus.catalog. locale.library tries to open the catalog as
Catalogs/<language>/SMaus.catalog in the directory, where the
SMaus executable resides. If it can't find it there, it tries to
open Locale:catalogs/<language>/SMaus.catalog.
Now you may copy SMaus.catalog to Locale:catalogs/<language> or
create a subdirectory catalogs/<language> in the directory, where
the SMaus executable resides and copy SMaus.catalog there.
PLEASE send me the translation files if you translate SMaus into
your native language. Thank you!
History
V1.15 first international version of SMaus
V1.16 not released
V1.17 changed small bug in the code which reads the config file
which could lead to loosing some bytes (140 or so);
checkmark gadgets are now scaled;
recompiled with SAS/C 6.2
V1.22 if no window was active, no window got ever activated
(found by Andreas M. Kirchwitz);
the loadconfig-filerequester had a wrong title (found by
Mikael Silfver); now a svenska catalog file done by
Mikael Silfver is supplied; recompiled with SAS/C 6.3;
some internal changes
V1.24 SMaus crashed on some machines when adjusting the timeout
slider; with the help of Mikael Silfver (he provided a
concrete example how to produce this crash and tested
new versions; nevertheless the crash never showed up on my
two machines, but I could figure out what might go wrong)
I could fix this.
Support
If you have any suggestions, bug reports etc., feel free to
contact the author of SMaus at the below address.
Stefan Sticht
Bibereckerweg 40a
D-94036 Passau
Germany
EMail:
Internet: sticht@edith.deg.sub.org
Fido: Stefan Sticht (2:246/200.4)
T h a n k y o u f o r r e g i s t e r i n g!
Greetings, Stefan Sticht