home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
randmod.zip
/
RANDMOD.CMD
next >
Wrap
OS/2 REXX Batch file
|
1994-01-10
|
2KB
|
58 lines
/* This Rexx Program will Randomize mods and send them */
/* to PMTRACKER */
/* last Revised 1/10/94 -- Suggestions are always welcome */
/* If you would like a more user-friendly version of this program, */
/* or a compiled executable, or would just like to support my future */
/* efforts, please send $5.00 to: */
/* Gregory Spath */
/* 3027 Guinevere's Dr, Apt. B2 */
/* Harrisburg, PA 17110 */
/* BEFORE RUNNING THIS PROGRAM, YOU MUST FIRST ADJUST THESE */
/* VARIABLES TO MATCH YOUR SYSTEM! */
tempdir = "f:" /* for temporary files */
moddir = "e:\music\" /* where mods are located */
modfiles = "*.mod" /* which ones to shuffle */
trakpath = "d:\sbpro\os2\" /* path of TRACKER.EXE */
'dir 'moddir''modfiles'>'tempdir'temp.out'
count=1
worthless=linein(tempdir'temp.out',1,1)
do 4
worthless=linein(tempdir'temp.out')
end /* do */
do while lines(tempdir'temp.out')>0
module.count=linein(tempdir'temp.out')
count=count+1
end
nummods = count-3
do i = 1 to nummods
module.i=moddir''subword(module.i,1,1)
end
'erase 'tempdir'modlist.cd'
do i = 1 to nummods
ran1 = random(1, nummods)
ran2 = random(2, nummods)
if ran2 = ran1 then ran2 = ran2 - 1
temp = module.ran1
module.ran1 = module.ran2
module.ran2 = temp
end
do i = 1 to nummods
call lineout tempdir'modlist.cd', module.i
end
trakpath'tracker.exe -M -T @'tempdir'modlist.cd'