>>>I need to play a series of .wav files but FoxPro commences the next .wav file before the first one has completed. How can I complete all .wav files? I tried using INKEY() to pause execution but this interferes with normal keystrokes. Is there another way?
>>>
>>>Regards, Angel
>>You could use a Multimedia activeX control and make it invisible by placing a shape in front of it.
>>Cetin
>
>Cetin
>
>Thanks for the prompt reply. I'll give it a go!
>
>Regards, Angel
Angel,
And there is another way but cumbersome. Store wav names and durations in a table :
create table wavs (WAVName m, duration i)
insert into wavs values ("c:\temp\wav1.wav",3)
insert into wavs values ("c:\temp\wav2.wav",5)
function playall
lparameters cWAVTable
local ix,start
local array aMyWavs
select * from (cWAVTable) into array aMyWAVS
if type("aMYWavs")="C"
for ix=1 to alen(aMYWavs,1)
set bell to (aMYWavs[ix,1]), 0
start = seconds()
?? chr(7)
do while seconds()-start <= aMYWavs[ix,2]
enddo
endfor
endif
set bell to
Cetin