Page 1 of 1

How stop iTunes playing in a sandboxed app?

Posted: Wed Dec 14, 2016 6:26 pm
by Mag
I'm working in a Mac project where I need to stop iTunes playing. Currently I use this code:

Code: Select all

put field "StopiTunesScript" into tTheScript
do tTheScript as applescript

This is the content of the field:
tell application "iTunes"
if it is running then -- to avoid to open iTunes if it is not running
stop
end if
end tell
All works fine but unfortunately, this don't work when I sandbox the app.

PS
I attach a screen shot of the Capabilities section of AppWrapper 3 (which I use to sandbox and sign the app) where I can't find an option dedicated to AppleScript.

Re: How stop iTunes playing in a sandboxed app?

Posted: Sat Dec 17, 2016 1:47 pm
by Mag
Really no one knows how to do this? :cry:

Re: How stop iTunes playing in a sandboxed app?

Posted: Wed Dec 21, 2016 10:07 am
by Ledigimate
A sandboxed app isn't supposed to be able to interact with other applications via applescript because if it could, wouldn't that defeat the purpose of the sandbox?