home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d487
/
assignx
/
assignx.docs
< prev
next >
Wrap
Text File
|
1991-05-10
|
4KB
|
100 lines
AssignX V1.2
by Steve Tibbett
INTRODUCTION
This is a simple program suggested to me by Doug Walker a while ago.
How many times have you seen a "Please insert volume <volume name>
in any drive" requester, and just had to find a CLI and type
"Assign <Volume Name> Drive:Path" just to retry the requester and
get on with this?
How many times have you typed "List DF9:" instead of "DF0:" only
to had your machine ask you to insert volume DF9: a few times,
before finally giving up?
Well no more. 8-)
REFERENCE
Whenever the system puts up a "Please insert volume" requester,
AssignX will hop in and add three more options to the "Retry/Cancel"
requester:
"Deny" will tell AssignX to not pop up this requester again
for this entire session. If you say LIST FRED: and FRED: does not
exist, the requester will pop up. If you select Cancel Forever and
then say LIST FRED: again, it will be as if the requester had come up
and you had hit CANCEL - the operation will be aborted.
"Assign..." is what this program is all about. In the LIST FRED: example,
selecting ASSIGN will bring up the ASL File Requester and ask you to
pick a file/directory to assign FRED: to.
Note that in most cases you will only want to pick a directory with the
file requester, not an actual file. If you wanted to assign FRED: to
RAM:FRED then you would pick RAM:FRED from the file requester, leave the
Filename gadget empty, and click Okay.
It's perfectly legal to assign something to a file instead of to a
directory - in the LIST FRED: case, if you were to aim the file requester
at "S:Startup-Sequence" then LIST would show S:Startup-Sequence's
information as if you had typed "List S:Startup-Sequence". This can
be useful at times, but is not often used.
"Mount" will have the same action as finding a CLI, typing "MOUNT DevName:"
and then clicking Retry. This is great for those cases where you want to
use RAD: and you haven't mounted it yet (or NET: or whatever other devices
you use but don't always mount).
INSTALLATION
AssignX ONLY RUNS UNDER 2.0 and will simply exit under 1.3.
Under 2.0, the best way to install AssignX is to drag it's icon into
your WBStartup drawer and forget about it - that's all there is to it!
If you want to, you can call it as a CLI program - AssignX doesn't exit
unless you manage to send it a Ctrl-C break signal, so you'll have
to use RUN >NIL: <NIL: ASSIGNX if you want to put it in a script.
THE SOURCE
AssignX's source is pretty simple, and is included for the suspicious
or the curious to peer at. It simply SetFunction()'s the EasyRequest()
vector to point to my own routine, which examines the first argument
that the es_FormatString is going to be fed through (es_FormatString
is "%s%s%s" for the requester we're interested in), and if it matches
"Please insert volume" then the requester will have the extra gadgets
added to it. The source won't be compilable without my library of
routines that I use a lot, as I call two of my own routines -
AslFileRequest() and EasyRequester(), which are just my ways of calling
the ASL File Requester, or bringing up an EasyRequest(), without having
to worry about intializing structures, etc. These should be easy to replace
if you wish to modify it.
The main program is in "AssignX.c" with a bit of ASM code in "asmbit.a".
THE AUTHOR
I can be reached on People/Link (STEVEX), Bix (s.tibbett), or on my BBS
at 613-731-3419. If you're modemless and wish to talk to me, give me
a call at 613-731-5316 in the evening.
AssignX is placed in the Public Domain.
...Steve
NOTE: V1.2 is just V1.1 with a bug fixed - it no longer assumes the first
argument on the stack is a pointer to a string, rather it checks the format
string first to make sure. Gets rid of some harmless enforcer hits. Added a
version string, also.