mikejandreau Posted June 9, 2017 Posted June 9, 2017 I’m building a workflow that effectively changes input/output on my computer and pauses iTunes/Radium. So when I get a call, I can hit a keyboard shortcut and change my input/output to my headset, then back to speakers when I’m done. That part’s working, but I’ve got a second action executing Applescript chained in that should be pausing iTunes or Radium if they’re running, which doesn’t seem to be working. If I assign a keyword or trigger directly to the AppleScript to pause the music, it works, but not when it’s chained after the Perl script to change input/output. I can’t seem to figure out why. I uploaded the .workflow here: http://take.ms/8UUpO if someone can take a look and let me know what I'm missing, I'd appreciate it.
deanishe Posted June 9, 2017 Posted June 9, 2017 Don't use Run NSAppleScript. Use a normal Run Script action instead, with Language set to /usr/bin/osascript (AS).
mikejandreau Posted June 9, 2017 Author Posted June 9, 2017 @deanishe That didn't work either. It's like the workflow completely ignores the script(s) after the Perl scripts complete. Even with the Run NSAppleScript code, if I run it directly from the keyboard shortcut, bypassing the Perl script(s), it works. So it's not a code issue, but something odd happening in the ordering of the workflow, I think. Any other suggestions?
mikejandreau Posted June 9, 2017 Author Posted June 9, 2017 It works for me too, just not in conjunction with the other scripts. Alfred's completely ignoring that it exists, unless I have the keyboard shortcut execute it and only it.
mikejandreau Posted June 9, 2017 Author Posted June 9, 2017 What's even more weird; if I re-order them so the AppleScript runs first, it works flawlessly. Oh well, it works now with a little bit of re-ordering. Not sure why it didn't work the other way, but I'm happy it's working now!
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