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...

matt
  • 515,959
  • 87
  • 875
  • 1,141
John
  • 538
  • 4
  • 18
  • “App has nothing to do with Adobe...” and the error is unrelated to your app. You must clean up your scripting additions. – matt Aug 31 '19 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 }() – John Aug 31 '19 at 20:03
  • It doesn't matter what your code is. Your scripting additions need to be cleaned up. – matt Aug 31 '19 at 21:58

1 Answers1

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.

Ted Wrigley
  • 2,921
  • 2
  • 7
  • 17
  • 1
    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. – foo Sep 01 '19 at 08:26
  • 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 Thanks again! – John Sep 01 '19 at 14:29