The file CheckQualifiers.doc follows. Note that there is also a German file
Checkqualifiers.dok in the archive.
DISCLAIMER: CHECKQUALIFIERS SOFTWARE IS PROVIDED "AS-IS", NO WARRANTIES OF
ANY KIND ARE MADE. ALL USE IS AT YOUR OWN RISK.
CheckQualifiers was written on an A4000 with OS 3.1 (V40), but should work
on all 68000 based machines with OS 2.04 (V37) and up.
CheckQualifiers is a small CLI utility meant for use in scripts. It checks
if a given set of qualifiers is currently pressed or not and sets its
return code accordingly. There is no output unless you ask for the template
or an error occurs, so a closed cli window will (hopefully) not pop up.
We check for both LSHIFT and LALT. The return code is returned in $rc, as
all good programs should do. If there are more than one IF to react to the
qualifiers, we need to store $rc in one of our variables because IF changes
the contents of $rc.
CheckQualifiers LSHIFT LALT
Echo >ENV:cqrc $rc ; save $rc to $cqrc
IF VAL $cqrc EQ 0
Echo "neither LSHIFT nor LALT"
IF VAL $cqrc EQ 1
Echo "LSHIFT or LALT, but not both"
IF VAL $cqrc EQ 2
Echo "LSHIFT and LALT and something else"
IF VAL $cqrc EQ 3
Echo "LSHIFT and LALT and nothing else"
EQ checks for equality. You can use GT, GE, NOT GT and NOT GE to check for
>, >=, <=, <, respectively.
D-67435 Neustadt an der Weinstraße
Greetings go to...
my beta-testers Michael and Stephan,
and all authors, who publish something and do not ask for anything in
Happy checking! Th. :-})