Podcasts Play & Pause

I have been using this script assigned to a KM shortcut to tell Spotify to Play or Pause...

tell application "System Events"
   set quit delay to 0
   set spotifyIsRunning to (name of every process) contains "Spotify"
end tell
if spotifyIsRunning then tell application "Spotify" to playpause

Is it possible to achieve this in the Apple Podcasts app?

1 Like

Sadly, the Apple Podcasts app doesn't have an AppleScript dictionary.

I've used the hardware key to get play/pause to work.


That's great Jim!

Can we add a condition to this so that it only works with the Podcasts app and doesn't trigger the music in the Apple Music app?

Not that I can think of, mainly due to the lack of the AppleScript dictionary in the Podcasts app.

That said, if the Podcasts app was the last app to play media, the Play hardware key should work fine for your needs.

The Play hardware key should not trigger the Apple music app, unless it is the last app to play media (and so on, for any app that plays media).

Try this using the gear icon.



Good solution KC! I didn't even know that setting was buried in that menu!

1 Like

I used to think similar thoughts.

One of the things I learned, with any application, was to go thru all the menus. I know I won’t understand how to use everything and I’m far from a KM pro, but the discovery helps. With that being said, @peternlewis and @JMichaelTX do a phenomenal job of placing valuable information in the wiki.

For this topic, the Type a keystroke action shows what’s available in that gear section.

OAN - There are different knowledge levels in this forum but I truly think, no matter the level, we are all rookies and if we chose to, we will continue to evolve using this spectacular KM tool.

1 Like

KC you nailed it!

The perfect solution, I shall sleep easy now knowing that KM (and the community that supports it) is still the best app ever.

Such a simple action, especially compared to some of the complex macros I was trying to create this with. Your assessment of software knowledge is absolutely spot on.


Honestly, I believe this is one of the most important things to start doing to move from being a computer novice to at least an intermediate. Just run your mouse over the menus, check out the preferences, that sort of thing. Often when a novice asks for help from an “expert” the first thing said expert will do is start looking through the menus for a solution - they don't know any more than the novice, they just know where to start looking.