Okey that’s good.
If I press button a, it wil be play a sample a.mp3 for 10 seconds, also he mute the mediaplayer for 10 seconds and after 10 seconds, a.mp3 stops playing and the music from the mediaplayer is back. And that’s also with button s, if I press s, s.mp wil be playing for 20 seconds and the mediaplayer mute the music for 20 seconds, after 20 seconds, the music is back again.
But now the problem. If I press a and after 2 seconds I press s, he will play s.mp3, that’s oke, because I press s as latest, but in the background, the 10 seconds from button a is running also, so the unmute from a will be back and bring the music back on the mediaplayer while s.mp3 is playing.
So when I press a, and heys planning a.mp3, oke, after 2 seconds when I press s (s.mp3) he must stop the actions from a, including mute. So stop all actions from a and go further with the latest s action.
I hope someone can help me.
Thanks allot
X Natascha
See here the code i have now:
Code:
PostMessage, 0x111, 18817, 0, , Windows Media Player
return
a::
SoundPlay, %A_ScriptDir%\sounds\a.mp3
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
SoundSet, 1, Microphone, mute
soundset, 1, Line, mute
soundset, 1, Cd, mute
soundset, 1, Aux, mute
SetTimer, a_continue, 1000 ; run a_continue once, in 10 seconds.
Return
a_continue:
SoundSet, 0, Microphone, mute
soundset, 0, Line, mute
soundset, 0, Cd, mute
soundset, 0, Aux, mute
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
return
s:
SoundPlay, %A_ScriptDir%\sounds\s.mp3
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
PostMessage, 0x111, 18816, 50, , Windows Media Player
SoundSet, 1, Microphone, mute
soundset, 1, Line, mute
soundset, 1, Cd, mute
soundset, 1, Aux, mute
SetTimer, s_continue, -2000 ; run s_continue once, in 20 seconds.
return
s_continue:
SoundSet, 0, Microphone, mute
soundset, 0, Line, mute
soundset, 0, Cd, mute
soundset, 0, Aux, mute
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
PostMessage, 0x111, 18815, 50, , Windows Media Player
return