/* ACDPShell.rexx 1.1 by Martin Kresse
   Use this script to test the arexx port of ACDPlay */

OPTIONS PROMPT 'Command> '                  /* set prompt */
OPTIONS RESULTS                             /* demand 2nd results */
address 'ACDPLAY'                           /* set destination for commands */

Start:  SIGNAL ON Syntax                    /* set exeption labels */
        SIGNAL ON Error

        do forever
            parse pull input                /* read command line */
            interpret input                 /* execute this command line */
            if RESULT ~= 'RESULT' then      /* if there is any 2nd result, */
                say '--->' RESULT           /* display it */
        end

Syntax: say 'Error' RX 'in line' sigl':' errortext(RC)  /* display error, */
        SIGNAL Start                        /* errortext and jump back */

Error:  say 'Returncode: ' RC               /* display errorcode */
        SIGNAL Start                        /* and jump back to Start */
