home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / randmod.zip / RANDMOD.CMD next >
OS/2 REXX Batch file  |  1994-01-10  |  2KB  |  58 lines

  1. /* This Rexx Program will Randomize mods and send them */
  2. /* to PMTRACKER */
  3. /* last Revised 1/10/94 -- Suggestions are always welcome */
  4.  
  5. /* If you would like a more user-friendly version of this program,    */
  6. /* or a compiled executable, or would just like to support my future  */
  7. /* efforts, please send $5.00 to:                                     */
  8. /*                   Gregory Spath                                    */
  9. /*                   3027 Guinevere's Dr, Apt. B2                     */
  10. /*                   Harrisburg, PA  17110                            */
  11.  
  12. /* BEFORE RUNNING THIS PROGRAM, YOU MUST FIRST ADJUST THESE */
  13. /* VARIABLES TO MATCH YOUR SYSTEM! */
  14.  
  15. tempdir = "f:"                /* for temporary files */
  16. moddir = "e:\music\"          /* where mods are located */
  17. modfiles = "*.mod"            /* which ones to shuffle */
  18. trakpath = "d:\sbpro\os2\"    /* path of TRACKER.EXE */
  19.  
  20.  
  21. 'dir 'moddir''modfiles'>'tempdir'temp.out'
  22.  
  23. count=1
  24. worthless=linein(tempdir'temp.out',1,1)
  25. do 4
  26.    worthless=linein(tempdir'temp.out')
  27. end /* do */
  28.  
  29. do while lines(tempdir'temp.out')>0
  30.    module.count=linein(tempdir'temp.out')
  31.    count=count+1
  32. end
  33.  
  34. nummods = count-3
  35. do i = 1 to nummods
  36.    module.i=moddir''subword(module.i,1,1)
  37. end
  38.  
  39. 'erase 'tempdir'modlist.cd'
  40. do i = 1 to nummods
  41.    ran1 = random(1, nummods)
  42.    ran2 = random(2, nummods)
  43.    if ran2 = ran1 then ran2 = ran2 - 1
  44.    temp = module.ran1
  45.    module.ran1 = module.ran2
  46.    module.ran2 = temp
  47. end
  48.  
  49. do i = 1 to nummods
  50.       call lineout tempdir'modlist.cd', module.i
  51. end
  52.  
  53.  trakpath'tracker.exe -M -T @'tempdir'modlist.cd'
  54.  
  55.   
  56.  
  57.  
  58.