Page 1 of 1

pause media then play sound after sound start media agian

Posted: 16 Apr 2016, 14:25
by DuckStyle
Hello ,

I'm working on a script that pauses spotify and then plays 2 sounds in order and then plays the spotify song again this every 10 minutes. Only its not working. I tried this code:

Code: Select all

loop
 {
 	Sleep, 10000 ;
 	Send {Media_Play_Pause} ;
	SoundPlay, \test.mp3 ;
	SoundPlay, \test2.mp3 ;
	Send {Media_Play_Pause} ;
 } 
I was hoping this loop will execute everything in order but it just pauses and plays spotify instantly and then plays the sound.

Already thanks for helping :D

Re: pause media then play sound after sound start media agian

Posted: 21 Apr 2016, 07:07
by lifeweaver
Hi DuckStyle,

Sleep is in milliseconds, in your script it only sleeps 10 seconds, you need 600000.