Apple Music Transport Controls
Is it possible to set up a macro that will trigger system play/pause, previous/rewind, and next/fast forward buttons on a Streamdeck like the native Mac Streamdeck app? Using their interface, pressing a previous/next button skips to the appropriate track while holding activates a fast forward or rewind state. I'd love to recreate this functionality if possible.
Thanks for your time!
- Chris Shaw @Chris_Shaw2023-02-15 19:02:21.391Z2023-02-15 20:03:19.186Z
At the moment I can't figure out how to simulate the music control keys on a Mac's keyboard which would make these scripts work with other music apps but you can control Apple Music with simple AppleScript commands.
This script will play/pause Music. Just duplicate the script and replaceplaypuase
with the other commands listed in the commentssf.system.execAppleScript({ script:`tell application "Music" to playpause` }) /* for other functions just replace `playpause`with any of the following commands: stop pause play play next track play previous track */
for other function like controlling the volume etc check out this article - just be sure to use "Music" in the commands instead of "iTunes"
https://alvinalexander.com/apple/itunes-applescript-examples-scripts-mac-reference/