Slimelite BBS

New Commands ?

Back to AMIGA_OS&EM

From Adam Dawes · 1996-03-31 18:47 · #67614 in AMIGA_OS&EM

Hi Vince!

 AD>> RequestChoice TITLE="Test" BODY="Sure?" GADGETS="OK|Cancel" >ENV:Result
 AD>> if $Result eq 0
 AD>>    echo "You pressed Cancel."
 AD>> else
 AD>>    echo "You pressed Ok."
 AD>> endif

 VG> Cheers Man. I aint tried it yet but it looks like it should work.
 VG> Problem is that it still only gives you 2 choices and I want 3.

Ok then! :)


RequestChoice TITLE="Test" BODY="Sure?" GADGETS="Yes|No|Cancel" >ENV:Result if $Result eq 0
   echo "You pressed Cancel."
endif
if $Result eq 1
   echo "You pressed Yes."
endif
if $Result eq 2
   echo "You pressed No."
endif


The option on the right is always zero, and the other options count up from left to right, starting at 1. So if you had 6 buttons, the values would be:

  1  2  3  4  5  0

 VG> I have been experimenting with ArexxReqTools and have almost got it
 VG> sorted but I cant seem to get Arexx to call an external Amiga DOS
 VG> command. "Call" is supposed to do it but it wont work for me.

To execute an AmigaDOS command, use "address command". If I wanted to type the file "ram:textfile", I could do this:


  address command "type ram:textfile"


If you can't get it to work as you want then let me know!

.\dam.          [Team AMIGA]          //\ ad32@brighton.ac.uk \\/

--- Spot 1.3a #1051
 * Origin: Adam the Barbarian, killed by bumping into a boulder. (2:441/93.5)