home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 19
/
af019.adf
/
INSTALLPRINTER
< prev
next >
Wrap
Text File
|
1978-04-04
|
3KB
|
127 lines
. key number
.bra {
.ket }
def number 0
; This recursive script comes courtesy of Mastering AmigaDOS scripts
; another great volume in the Mastering AmigaDOS series
; Mastering AmigaDOS scripts will be published in mid 1991
; by Bruce Smith Books
; This trinket written by Mark Smiddy"
; for Amiga Format readers
; IT MUST HAVE THE NAME OF INSTALLPRINTER
if "{number}" EQ "0"
echo "Easy Printer Driver setup*n"
echo "Written by *e[33mMark Smiddy*e[31m for *e[33mAmiga Format*e[31m"
echo "From Mastering AmigaDOS scripts"
echo "Another volume in the Mastering AmigaDOS 2 series"
echo "The most informed AmigaDOS reference EVER!*n*n"
if not exists ram:Smiddy
echo "Wait - copying commands to resident list...*n*n*n"
resident c:echo add
resident c:if add
resident c:else add
resident c:endif add
resident c:copy add
resident c:delete add
resident c:join add
resident c:edit add
resident c:assign add
resident c:execute add
resident c:type add
resident c:list add
resident c:ask add
resident c:search add
copy installprinter ram:
echo >ram:Smiddy "Working..."
endif
if not exists ram:drivers
echo "*nInsert the disk marked *"Extras 1.3*" in df0:"
ask "Then press return..."
echo "copying drivers to ram: please wait..."
copy df0:devs/printers/#? ram:drivers quiet
endif
list ram:drivers to ram:print lformat "%s"
type >ram:printers ram:print opt n
type ram:printers
echo "*nSelect your printer and enter its " noline
execute ram:InstallPrinter ?
echo "*nInsert the disk marked *"Workbench 1.3*" in df0:"
ask "Then press return..."
if exists ram:command1
execute ram:command1
;
; This next bit runs Preferences for you
; BUT it allows you to modify the preferences on ANY disk!
; This way you can have more than one printer disk... etc.
;
ask "*nRun Preferences now?"
if warn
assign devs: df0:devs
if exists df0:Prefs/Preferences
df0:Prefs/Preferences PRINTER
else
echo "Preferences program missing/renamed"
ask "Shall I try the boot disk?"
if warn
if exists sys:Prefs/Preferences
sys:Prefs/Preferences PRINTER
else
echo "Blow me! That one's missing 'n all guv!"
endif
endif
endif
assign devs: sys:devs
endif
echo "All done... cleaning up"
endif
if "{number}" NOT EQ ""
delete ram:smiddy
resident echo remove
resident assign remove
resident if remove
resident endif remove
resident copy remove
resident type remove
resident execute remove
resident join remove
resident edit remove
resident list remove
resident ask remove
resident else remove
resident search remove
resident delete remove
endif
endif
else
;
; Here we use the auto EDIT macros!
; This is covered with loads of examples in
; Mastering AmigaDOS volumes I and II
;
search >nil: ram:printers search " {number} "
if warn
echo "Can't find that printer on my list..."
echo "Program exiting"
endcli
else
echo >ram:auto1 "df / {number} /;7#;n;0d"
echo >ram:auto2 "cl//"
echo >ram:part1 "COPY from ram:drivers/" noline
echo >ram:part3 " to df0:devs/printers" noline
edit from ram:printers to ram:part2 with ram:auto1 ver=nil:
join ram:part1 ram:part2 rampart3 as ram:command
edit ram:command to ram:command1 with ram:auto2 ver=nil:
echo "*n Your selection was: " noline
type ram:part2
endif
endif