Skip to content

Compliments! A great alternative to quirky self-built solution: Hotkey > Service > AppleScript app bundle #8

@porg

Description

@porg

Great app!

👍 Does just what I want!

User need

The reason why I wanted to direct volume control of Apple Music app via hotkey is because streaming to my Airplay device directly from Apple Music uses way less bandwidth (=exactly the bitrate of the MP3/AAC file you are streaming plus some control data) instead of when setting the system output to airplay (=a high bitrate audio mix from all your audio sources, including system and app beep sounds, etc) where one has the convenient Volume hotkeys on my keyboard readily available.

My workaround so far was

Direct Apple Music control by a self-built solution which was far less CPU efficient, more glitchy, and less integrated!

  • System Preferences > Keyboard > Shortcuts > Services > General
    • Music Volume - (Service): F11 (You get this by Fn + Vol-)
    • Music Volume + (Service): F12 (You get this by Fn + Vol+)
  • These each triggered the corresponding Automator Service in ~/Library/Services
    • They just were wrappers which used the task "Launch Application"
  • Then at /Application/Scripts I had the corresponding AppleScripts saved as .app bundles
    • They remote control Apple Music.

Reason for this setup

  • At first use you must grant "Music Volume -.app" the permission to remote control "Music.app" but from then on its remembered.
  • If you put the AppleScript code directly into the service, then you must grant permission to remote control "Music.app" in each app from which you trigger the hotkey!
    • 👎 Crazy unconvenient for a hotkey solution.
    • 👎 And also a unnecessary burden on the security catalog system. (More rules to check overally makes it slower over time)

Additional downsides

  • 👎 Used far more CPU
  • 👎 Took about half a second in which you quickly saw your app loosing focus, the AppleScript app shortly flashing the menu bar, then returning focus to your current app
  • 👎No nice notification. You could use the AppleScript "notification" verb, but these general notification for a quick control like music volume +/- are far to distractive on screen (too long, not centered but sliding in from the right on top)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions