home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga Shareware Floppies / ma16.dms / ma16.adf / DASModPlayer / Rexx / PlayRandom.drx < prev    next >
Text File  |  1993-12-08  |  2KB  |  63 lines

  1. /*
  2.     Arexx demoscript for DasModplayer by Erno Tuomainen
  3.  
  4.     Fade Volume to 1 and Select RANDOM module from Program list!
  5.  
  6.     If DASModPlayer IS NOT RUNNING, then this script will run it
  7.     LOAD your ModuleList (edit MODLISTNAME) and start playing the
  8.     RANDOM module in the list!
  9.  
  10. */
  11.  
  12. ModListName='YourList'        /* Specify your Program List here    */
  13.                 /* Full PATHFilename! eg. Dh0:List.prg  */
  14. PlayerPath='Work:miscutils/DASModPlayer'    /* Path for DASMODPLAYER */
  15.  
  16. OPTIONS Results
  17.  
  18. if ~SHOW('L','rexxsupport.library') then DO
  19.         if addlib('rexxsupport.library', 0, -30, 0) then
  20.                 nop
  21.         ELSE DO
  22.                 say 'RexxSupport.library NOT Available, FIND IT!'
  23.                 exit 10
  24.         END
  25. END
  26.  
  27. result = SHOW('Ports', 'DASMP')
  28. if result=0 then DO
  29.         say 'DasModPlayer not Running! Loading DasModplayer and ProgramList'
  30.     say ''
  31.         ADDRESS COMMAND(Playerpath)
  32.  
  33. /* we need the following 3 lines to test when AREXX-script has loaded   */
  34. /* DASModPlayer into the backround.                                     */
  35.     Checkloop1:
  36.             result = SHOW('Ports','DASMP')
  37.             if result=0 then signal Checkloop1
  38.     If ModListName='YourList' then DO
  39.         say 'Please EDIT this Rexx-script and change your program list into variable LISTNAME'
  40.         EXIT
  41.     END
  42.     ADDRESS 'DASMP'
  43.     PLAYMODE RANDOM        /* Set sequential play and repeating programlist */
  44.     LOAD ModListName    /* Load your program list*/
  45.     MOVELIST 0        /* Jump to start of list */
  46.     PLAY            /* Start playing RANDOMLY */
  47.     EXIT
  48.         END
  49.  
  50. ADDRESS 'DASMP'
  51.  
  52. MODCOUNT        /* Get number of modules in ProgramList */
  53. if result < 2 then do
  54.     say 'Not enough Modules loaded into ProgramList'
  55.     exit
  56.     END
  57.  
  58. PLAYMODE RANDOM        /* Set random playmode */
  59.  
  60. NEXT            /* Start Playing the Next Module */
  61.  
  62. EXIT
  63.