0

Trying to run a script from our app and get this error message, even with something simple like:

tell application "Finder"

    display dialog "Hello World"

end tell

Have set the appropriate Entitlements like: "com.apple.security.scripting-targets" and "com.apple.security.temporary-exception.apple-events:before:10.8" App has nothing to do with Adobe...

3
  • “App has nothing to do with Adobe...” and the error is unrelated to your app. You must clean up your scripting additions. Commented Aug 31, 2019 at 19:47
  • 1
    Thanks for the feedback here is the code. A solution should be easy for you! var script: NSAppleScript = { let script = NSAppleScript(source: """ tell application "Finder" display dialog "Hello World" end tell """ )! let success = script.compileAndReturnError(nil) assert(success) return script }() Commented Aug 31, 2019 at 20:03
  • It doesn't matter what your code is. Your scripting additions need to be cleaned up. Commented Aug 31, 2019 at 21:58

1 Answer 1

2

The "skipped scripting addition..." error is merely a warning, not a fatal error. It is informing you that it tried to load a particular scripting addition (osax), but rejected it because it doesn't meet system integrity (security) standards. The system will go on to try and execute the script normally without that osax, which in this case (and most cases) should work.

Osaxen are stored in '/Library/ScriptingAdditions' and '~/Library/ScriptingAdditions'. Look in those two folders for the offending osax — which in this case is obviously Adobe Unit Types.osax — and move or discard it. The warning will go away, and your scripts will still run correctly. Or just leave it there and ignore the warning on the off-chance that you might someday want to load and use the osax explicitly.

Sign up to request clarification or add additional context in comments.

2 Comments

As you say, the issue is an obsolete osax, not the OP’s script. Furthermore, as of 10.14 macOS no longer supports loading third-party osaxen from '/Library/ScriptingAdditions' and '~/Library/ScriptingAdditions', so OP might as well clear them out.
YES. This is the correct answer. The script wasn't working or returning the NSAppleScript object so we assumed the warning was the issue. The warning is gone but the scripts still don't work (they do return objects). You obviously know scripting, perhaps you can take a look at this code <stackoverflow.com/questions/57746798/…> Thanks again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.