On 14 Jan 2013, at 17:50, John Nairn <j...@geditcom.com> wrote:

> I have sandboxed an app that allows users to run scripts as a major feeature 
> (i.e., dealbreaker on sandboxing only answer is to delete this feature). I 
> was pleased that I can run AppleScripts fine through the sandboxed app from 
> Apple's Script Editor, but the user experience is much (much, much) better if 
> they can select a script from a menu in my app and run it, but that method 
> fails. Here is more info:
> 
> 1. Script running code is sound and works fine if app is not sandboxed.
> 2. Script is compiled, error free, and does not try to send events to any app 
> except my own
> 3. Script is stored in application support of my container and therefore I 
> should have read and write permission on that file
> 4. The first step in running the script (which is when is fails) is simply:
> 
>     script = [[NSAppleScript alloc] initWithContentsOfURL:[NSURL 
> fileURLWithPath:scriptPath] error:&errorInfo];
> 
> The errorInfo dictionary has only NSAppleScriptErrorNumber = -43 and no other 
> details. I could not find this error number in a google search.
> 
> 5. I have more problems running python scripts using Scripting bridge when 
> sandboxed, but I am working on one problem for now

Go watch the sandboxing videos from WWDC this year. They cover automation quite 
a bit, and all will be made much clearer.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to