For months now I've had an Automator action that was working fine: it does some stuff, then at the end does "run script XYZ with parameters ARGS". And now, magically, today, that last part has stopped working, even after I rebooted. I have no idea what changed. System log:
iTunes[269]: AppleEvents/sandbox: Returning errAEPrivilegeError/-10004 and denying dispatch of event syso/exec from process 'Automator Runner'/0x0-0x51051, pid=608, because it is not entitled to send an AppleEvent to this process.
com.apple.automator.xpc.workflowServiceRunner[554]: WorkflowServiceRunner received error running Workflow Service at /Users/jwz/Library/Services/Add to iTunes.workflow: The action "Run AppleScript" encountered an error.
I already have Automator, Automator Runner and AppleScript Editor enabled in System Preferences / Security and Privacy / Privacy / Accessibility.
I swear, the logo for Automator should be a little hammer hitting you in the face.
Update: Figured it out. What I had before was an Automator .workflow that did:
on run {input, parameters}
tell application "iTunes"
...stuff...
set ARGS to ...stuff...
run script FOO with parameters ARGS
end tell
end run
That doesn't work any more, but this does:
on run {input, parameters}
tell application "iTunes"
...stuff...
set ARGS to ...stuff...
end tell
run script FOO with parameters ARGS
end run
because security or something. Yeah.
I posted this, but it didn't show up on your page.
Application entitlements are built into the App's code signature, so I'm guessing here that Apple changed the entitlements in iTunes and you took a system update.
Are you using one of "Doug's Applescripts" for iTunes? Because this problem happened last year and he had to rewrite all his scripts. The fix is pretty simple though.
http://dougscripts.com/itunes/2013/10/artwork-scripts-and-mavericks/
What my script is doing is nothing like that, so I have no idea what change would make it start working again.
Long shot and I'm not a Mac user so I'm not even sure I understand your question, but could that be related to the security update Apple released today for the Bash vulnerability?
Maybe those can help?
http://stackoverflow.com/questions/19482632/java-application-no-longer-allowed-to-talk-to-itunes-via-applescript
http://web.archiveorange.com/archive/v/2NbViEzKHguH3B11u9my
Do you use "write" in an iTunes loop in your Applescript?
No, I'm not writing files. I'm just using "run script" to try to load another script as a subroutine.
Maybe in that other script?
Or change the way that you run the other script with do shell and osascript
The other script doesn't write files either. It's getting an error trying to load that script. I don't know how else to load a script and pass it arguments except by doing "run script".
I think it would be something like this:
do shell script "osascript yourscript.scpt arguments"
if arguments are complex, \ escaping is needed
arguments are taken in with:
on run argv