Sign in to follow this  
Followers 0
jhocott

Win Med Plyr - Detect Song Finished In Scr

7 posts in this topic

I'm a newbie to AutoItv3. Managed to get several scripts working but am stumped on this one. The purpose of the script is a simple timer that plays a midi file after counting down a number of seconds. Songs are typically 2:15 - 3:+ minutes long. I want to Splash a message when the song ends. I am having to choose between a fixed sleep or closing the media player window. I have several versions of the script, none are completely satisfactory.

Is there a way I can detect the end of a song ,media player remains active but does not close.

Thanks Jay


Jay

Share this post


Link to post
Share on other sites



does the command SoundPlay() not work for the midi file?

Lar.

<{POST_SNAPBACK}>

Yes it does, despite the help text state .wav & .mp3 only.

However I still have the same problem, i.e., how to abort the song playing?


Jay

Share this post


Link to post
Share on other sites

Soundplay("") aborts


Who else would I be?

Share this post


Link to post
Share on other sites

Soundplay("") aborts

<{POST_SNAPBACK}>

Is it right? I can't abort the soundplay.

Can you give a full example of the function "Soundplay()"

Thank you !

Share this post


Link to post
Share on other sites

SoundPlay("file.wav"); play file.wav
Sleep(2000); wait 2 seconds
SoundPlay(""); if file.wav is not finished playing in 2 seconds, stop playing anyway


Who else would I be?

Share this post


Link to post
Share on other sites

Is it right? I can't abort the soundplay.

Can you give a full example of the function "Soundplay()"

Thank you !

<{POST_SNAPBACK}>

Excellent! This solves my problem.

Thanks


Jay

Share this post


Link to post
Share on other sites

ok thank you!

I'm sorry because i used "soundplay()aborts"

haha

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0