home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
winutil
/
wbt31b
/
playmidi.wb$
< prev
next >
Wrap
Text File
|
1991-12-25
|
1KB
|
32 lines
IntControl(12,1,0,0,0) ; Allow Batch file to be terminated
; Get default directory from INI file. If none, use the Windows Dir
MidiDir1=inireadpvt("Batch","MidiDir",DirWindows(0),"WWW-PROD.INI")
; Confirm user for Directory of MIDI files to play
MidiDir2=AskLine("MIDI Player","Enter directory of MIDI files",MidiDir1)
; Gee, if user specified a different dir, remember the new one
if MidiDir1!=MidiDir2 then iniWritePvt("Batch","MidiDir",MidiDir2)
; Change to the MIDI file directory
DirChange("MidiDir2")
; Get a list of all the *.MID and *.RMI files in the directory
files=FileItemize("*.MID *.RMI")
; How many files are in there
count=ItemCount(files," ")
:again ; AGAIN is used to play ALL the files again
index=0 ; set current file index to zero
:loop ; LOOP through each file in the directory
index=index+1 ; Increment file index
if index>count then goto again ; If bigger then number of files -> AGAIN
play=ItemExtract(index,files," ") ; Extract desired filename from list
WinTitle("",play) ; Change icon title to file name
PlayMidi(play,0) ; Play Midi file. Wait for completion
goto loop ; Go play the next MIDI file