home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
opus
/
v4
/
dopus-1541
/
rexx
/
dopus
/
1541
/
1541cmd.rexx
next >
Wrap
OS/2 REXX Batch file
|
1977-12-31
|
2KB
|
76 lines
/*
*
* Execute a 1541 drive command from DOpus.
*
* (c) 1995 by Christer Bjarnemo mr.bjarnemo@mn.medstroms.se
*
* Based on Twin-Dopus by Patrick Van Beem (patrick.van.beem@aobh.xs4all.nl),
* which based he's script on the DOpusLhaARexx package by Geoff Seeley.
*
*/
dircmd = "Work:Emulators/A64/Utils/" /* Note. If the file ENVARC:1541.PREFS */
rxdir = "Rexx:Dopus/1541/" /* exists, that one will override the */
tmpdir = "t:" /* settings here... */
DOpusPort = 'DOPUS.1'
snuff = '22'x
if open(1,'env:1541.prefs','Read') then do
dircmd = readln(1)
rxdir = readln(1)
tmpdir = readln(1)
address command 'type 'tmpdir'_64dir.tmp'
end
close(1)
dircmd = slashpath(dircmd)
rxdir = slashpath(rxdir)
tmpdir = slashpath(tmpdir)
if ~show(l,"rexxsupport.library") then
call addlib("rexxsupport.library",0,-30,0)
if showlist('Ports', DOpusPort) = 0 then do
say 'Directory Opus Arexx port not found. Aborting.'
call CleanUp
end
address(DOpusPort)
options results
/* setup DOpus window and tell user what's happening */
Busy on
TopText "Execute 1541-command..."
Getstring '"Enter a 1541 command (for example: i = initialize, v = validate)" ""'
cmd = result
if cmd = '' | cmd = 0 then call cleanup
address command dircmd'64Cmd >'tmpdir'1541.tmp "'cmd'" 8'
if open(1,tmpdir'1541.tmp','Read') then do
Do for 8 ; tmp = readln(1) ; End
say tmp
Toptext tmp
close(1)
end
exit
/*---------------------------------------------------------------------------*/
Slashpath: procedure /* Put a (/) or (:) at the end of filenames (if neccessary) */
parse arg string
if right(string,1) ~= ':' & right(string,1) ~= '/' then do
string = string'/'
end
return string
/*---------------------------------------------------------------------------*/
CleanUp: /* Remove any files and exit */
Busy off
exit
return