Welcome, Guest. Please login or register.

Author Topic: I need help on a a script!  (Read 1640 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline GulliverTopic starter

I need help on a a script!
« 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!
 

Offline mike-

  • Sr. Member
  • ****
  • Join Date: Aug 2007
  • Posts: 438
    • Show only replies by mike-
Re: I need help on a a script!
« Reply #1 on: September 03, 2009, 04:13:05 AM »
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
« Last Edit: September 03, 2009, 04:17:33 AM by mike- »
C= Amiga Addict & Dendrophiliac
,,,
(Oo)
⎛☮ໄ
ﮑὠՀ
 

Offline GulliverTopic starter

Re: I need help on a a script!
« Reply #2 on: September 03, 2009, 04:19:58 AM »
just like i would do it, but without bailey, unluckily ;)
Anyway, is there someone who can help me?
« Last Edit: September 03, 2009, 04:57:24 AM by Gulliver »
 

Online Thomas

Re: I need help on a a script!
« Reply #3 on: September 03, 2009, 09:15:25 AM »
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.

Offline pVC

Re: I need help on a a script!
« Reply #4 on: September 03, 2009, 09:49:50 AM »
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 :)
« Last Edit: September 03, 2009, 09:54:20 AM by pVC »
Daily MorphOS user and Amiga active.
 

Offline GulliverTopic starter

Re: I need help on a a script!
« Reply #5 on: September 06, 2009, 05:15:44 AM »
Thanks @pVC just what i was looking for!