Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Gulliver on September 03, 2009, 03:49:45 AM
-
Hi, I am trying to get the following script to do the following:
Check if omniscsi.device exists
else quit this script and run PlayCD
if not exists omniscsi.device then continue with the following part:
IF NOT EXISTS ENV:PlayCDpatch
SETENV PlayCDpatch=""
STACK 8192
RUN >NIL: Playcdkludge 3 ;Unit number of your CD-ROM Drive here!
STATUS >ENV:PlayCDpatch COMMAND Playcdkludge
PlayCD
BREAK $PlayCDpatch
DELETE >NIL: ENV:PlayCDpatch
ENDIF
Any help appreciated. I am sorry, I am not good at all with programming, even lame scripts!
-
IF NOT EXISTS ENV:PlayCDpatch
SETENV PlayCDpatch=""
STACK 8192
RUN >NIL: Playcdkludge 3 ;Unit number of your CD-ROM Drive here!
STATUS >ENV:PlayCDpatch COMMAND Playcdkludge
PlayCD
ELSE (?)
BREAK $PlayCDpatch
DELETE >NIL: ENV:PlayCDpatch
ELIF
SYS:inet/merlin http://media.photobucket.com/image/baileys/BioPuritas/Baileys.jpg
FI
;loadwb
newshell
-
just like i would do it, but without bailey, unluckily ;)
Anyway, is there someone who can help me?
-
Which part of the script is giving you problems ? Looks ok to me, although it does not mention omniscsi.device anywhere. I am not sure what you need.
-
If the problem is to detect if there is omniscsi.device... I guess there would be better solution too, but atm this kludge comes in my mind :)
failat 21
version omniscsi.device >nil:
if fail
echo "does not exist"
else
echo "exists"
endif
Put anything you want instead those echos... quit command quits the script :)
-
Thanks @pVC just what i was looking for!