home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
newc_dev
/
cdrun370.lha
/
CDRun.doc
< prev
Wrap
Text File
|
1992-04-01
|
3KB
|
120 lines
CDRun V37.0 - Copyright (C) 1992 Jesper Kehlet
==============================================
Combined CD & Run + extension by Jesper Kehlet - 26 Mar 1992
============================================================
THIS PROGRAM REQUIRES AT LEAST V37 DOS LIBRARY!!!
Use TAB SIZE=4 for both the source and this file.
Why?
====
Things started with e.g. FKey may not always have the right directory
for home dir when started, so this solves it!
How?
====
Format: CDRun [DIR] <Homedirectory [COMMAND] <Commandspec>
Template: DIR,COMMAND/F
Purpose: To CD & Run in one move
Path: C:CDRun
Specification: To CD & Run, just CDRun with dir and command as
options.
Results: FAIL: Could not open DOS library (WHAT?!?)
ERROR: Not a valid directory or command
OK: Guess what... All went well!
Bugs: None known
Examples:
1> CDRun
will print out the current directory.
1> CDRun DF0:
will change current directory to DF0:
1> CDRun C:List LFORMAT="%s%s"
will run the C:List command with options
1> CDRun DF0: C:List LFORMAT="%s%s"
will run the C:List command with options and do it
with DF0: as home directory
Where?
======
It will be most useful for running programs from e.g. FKey, an old
ToolManager or similar programs, that does not allow you to set a
starting directory. Other than that, it is a full blown replacement
for both CD and Run in one command. Even though it cannot (YET!)
compete with the patternmatching in the built in CD, it is still
sufficient for most people.
What else?
==========
This code is a GREAT example of how you use some of the new AmigaDOS &
exec functions introduced in 2.0 and onwards - amongst these are
AllocVec(), FreeVec(), SetCurrentDirName() and last but not least:
SystemTagList() - the goodie!
This one is entirely pure. Does even handle DOS BSTR's without
getting in direct physical contact with them - ain't V37 great? I had
a BALL trying to find out, how you tell DOS, that it has changed dir
and that it should update you prompt if that contains information
about this, but I managed - yipee! There is still a problem with
WShell, but I'll get to fix this as soon as possible - don't you
worry!
If you wish to redirect the output of the command being run, you must,
unlike Run, put this redirection in the command. Specifying >NIL:
right after CDRun will only affect CDRun's output, not your external
command!
Postcards?
==========
I'm not some starving student eager to get all you got, but knowing,
that my program is being used really makes me happy (and my ego,
too!)...
This program is 'Postcardware' - a concept introduced by Klaus
Seistrup here in Denmark - so if you find this program useful, you
MUST send me a postcard! It should be addressed to:
Jesper Kehlet
Bredengen 19 - Svogerslev
4000 Roskilde
Denmark
FIDO 2:231/84.7