pause media then play sound after sound start media agian

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DuckStyle

pause media then play sound after sound start media agian

16 Apr 2016, 14:25

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
User avatar
lifeweaver
Posts: 144
Joined: 10 May 2014, 05:57
Location: OH
Contact:

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

21 Apr 2016, 07:07

Hi DuckStyle,

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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, RandomBoy and 405 guests