mikejandreau Posted October 16, 2018 Share Posted October 16, 2018 Hey guys, Part of one of my workflows, when triggered via a keyboard shortcut, pauses any audio/video that's playing and changes the volume on my computer. Here's the (basic) script: on alfred_script(q) --Check App Status, to only act on apps if running tell application "System Events" to set SkypeIsRunning to (count of (every process whose name is "Skype")) > 0 --iTunes if application "iTunes" is running then tell application "iTunes" pause end tell end if if application "Spotify" is running then tell application "Spotify" pause end tell end if if application "Plex Media Player" is running then activate application "Plex Media Player" tell application "System Events" key code 49 end tell end if set curVolume to get volume settings if output muted of curVolume is false then set volume with output muted else set volume without output muted end if end alfred_script It doesn't seem to work anymore in Mojave, likely due to permissions, though I went through the permissions doc (https://www.alfredapp.com/help/getting-started/macos-mojave/) and confirmed Alfred has the right permissions in Privacy for both Accessibility, Full Disk Access and Automation. But yet my script doesn't work. Anyone have any suggestions to try? Link to comment
mikejandreau Posted October 16, 2018 Author Share Posted October 16, 2018 I must be stupid. It was stuck because iTunes was frozen. Seems to be fine once I rebooted. Phew. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now