Preamble

There are three versions of Timer:

  1. Timer Free (available as free download from our site)
  2. Timer (available as a paid download from Mac App Store)
  3. Timer Pro (available as purchase on our store)


Timer and Timer Pro have specified features to play music with iTunes but they haven't  direct support for Spotify. To control Spotify, you can use AppleScript. Timer has not support for AppleScript but Timer Pro has it, so this tutorial is dedicated only to Timer Pro users.


If you did not know the difference between Timer and Timer Pro when you bought the app and now you need a feature of the Pro version, please contact us so we can find a solution together.




Solution

To control play and pause music with Spotify you have to create an AppleScript file and then set "Run AppleScript File" as Action. For example, here is a tutorial to launch Spotify and play music as a Timer Pro action:



1. Create an AppleScript file with the Apple's app Script Editor. A basic one could be:


tell application "Spotify"

    activate
    delay 5 -- let's take the time to launch Spotify
    play

end tell


(please feel free to modify this code to better fits your needs)



2. Choose "Run AppleScript File" as action in Timer Pro then select the file you just created.





3. Don't you know which commands supports Spotify? Just open the Spotify ictionary by using the dedicated menu item of Script Editor app:


File -> Open Dictionary -> Spotify.




You feel lazy?

In the bottom of this page you will find three AppleScript files named "Pause Spotify", "Play Spotify" and "Play and Pause Spotify" ready to download and use with Timer Pro or to customize to your liking.


NOTE:

Please be informed of any security implication involves the use of automation scripting before using AppleScript in your Mac.




More info

Spotify Developer - AppleScript API