On Tuesday, Sept 14 1999, Leston Drake wrote:
> Hello all,
>
> I've benefited from some previous posts (I'm sorry that I can't attribute
> them to the right person(s), since my memory is short) regarding issuing
> MCI commands using the mciSendString() function. I am trying to play a MIDI
> file in a loop (restart it again when it gets to the end of the file). My
> question is: How do I know when it has finished playing the MIDI file?
>
> I'm familiar with Toolbook, which has a similar MCI calling function, but
> you can include a notification object as a paramenter, and that object will
> receive a message when the call finishes executing. Is there something
> analogous in MC? Or is there a different way this is done in MC?
>
> Again, the goal is to play a MIDI file in a loop.
As far as I know, the only way to do this is to poll the MCISendString
function for the status of the MIDI file thats being played.
on startPlaying
--put your commands to alias the file here and then to play it
send "checkFinished" to me in 5 seconds
end startPlaying
on checkFinished
if mciSendString("status myAudio") is not "stopped" then
send "checkFinished" to me in 5 seconds
exit checkFinished
end if
--its finished, insert script to play it again here
send "checkFinished" to me in 5 seconds
end checkFinished
Regards,
Kevin
> TIA
>
> ------------------------------
> Leston Drake
> LetterPress Software, Inc.
> http://www.lpsoftware.com
> ------------------------------
Kevin Miller <[EMAIL PROTECTED]> <http://www.xworlds.com/>
Cross Worlds Computing, MetaCard Distributors, Custom Development.
Tel: +44 (0)131 672 2909. Fax: +44 (0)1639 830 707.