Re: NSString and file system Re: AppleScript in Sandboxed App

2013-02-03 Thread Daniel Höpfl
Hello, On Wed, 16 Jan 2013 17:12:15 +, jonat...@mugginsoft.com wrote: On 16 Jan 2013, at 15:50, Fritz Anderson fri...@manoverboard.org wrote: On 16 Jan 2013, at 3:52 AM, jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: Py_SetProgramName((char *)[[scriptRunner launchPath]

Re: NSString and file system Re: AppleScript in Sandboxed App

2013-01-18 Thread Mike Abdullah
On 16 Jan 2013, at 17:40, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Jan 16, 2013, at 09:12 , jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: To be honest I rarely remember to call -fileSystemRepresentation. The docs seem to indicate that its only purpose is to

Re: AppleScript in Sandboxed App

2013-01-16 Thread jonat...@mugginsoft.com
On 16 Jan 2013, at 03:44, John Nairn j...@geditcom.com wrote: Thanks. I watched the one on Seccure Automation Techniques in OS X. Near the end it said exactly what I wanted to hear which is that application-run scripts that target only themselves have no restrictions. So far it is half

NSString and file system Re: AppleScript in Sandboxed App

2013-01-16 Thread Fritz Anderson
On 16 Jan 2013, at 3:52 AM, jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: Py_SetProgramName((char *)[[scriptRunner launchPath] UTF8String]); If a char* is destined for the file system, you should be using -fileSystemRepresentation, not -UTF8String. I forget that all the time.

Re: NSString and file system Re: AppleScript in Sandboxed App

2013-01-16 Thread jonat...@mugginsoft.com
On 16 Jan 2013, at 15:50, Fritz Anderson fri...@manoverboard.org wrote: On 16 Jan 2013, at 3:52 AM, jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: Py_SetProgramName((char *)[[scriptRunner launchPath] UTF8String]); If a char* is destined for the file system, you should be

Re: NSString and file system Re: AppleScript in Sandboxed App

2013-01-16 Thread Quincey Morris
On Jan 16, 2013, at 09:12 , jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: To be honest I rarely remember to call -fileSystemRepresentation. The docs seem to indicate that its only purpose is to replace abstract / and . characters with OS equivalents. On OS X this would have seem to

Re: AppleScript in Sandboxed App

2013-01-15 Thread John Nairn
Thanks. I watched the one on Seccure Automation Techniques in OS X. Near the end it said exactly what I wanted to hear which is that application-run scripts that target only themselves have no restrictions. So far it is half true in my app. I can run an AppleScript now without troubles. But

AppleScript in Sandboxed App

2013-01-14 Thread John Nairn
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)

Re: AppleScript in Sandboxed App

2013-01-14 Thread Mike Abdullah
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

Re: AppleScript in Sandboxed App

2013-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2013, at 17:59, Mike Abdullah cocoa...@mikeabdullah.net wrote: Go watch the sandboxing videos from WWDC this year. They cover automation quite a bit, and all will be made much clearer. You want session 206 - Secure automation techniques in OS X. If you don't have access we

Re: AppleScript in Sandboxed App

2013-01-14 Thread Fritz Anderson
On 14 Jan 2013, at 11:50 AM, John Nairn j...@geditcom.com wrote: The errorInfo dictionary has only NSAppleScriptErrorNumber = -43 and no other details. I could not find this error number in a google search. For what it's worth: $ macerror -43 Mac OS error -43 (fnfErr): File not found --