Skip navigation.
 
mlRe: better alternative to [NSAppleScript executeAndReturnError:] for executing scripts in scripts menu
FROM : Bill Cheeseman
DATE : Tue Aug 01 23:50:22 2006

on 2006-08-01 2:19 PM, Jesse Grosjean at <email_removed> wrote:

> My application implements its own script menu and it uses
> [NSAppleScript executeAndReturnError:] to run scripts when someone
> chooses a script from the scripts menu. This works fairly well, but
> recently I remember seeing a discussion that I think said this wasn't
> the best way to execute scripts in this case. I don't remember, but
> maybe it was saying that it was better to use osascript from the
> command line to execute them. Problem is I can't seem to relocate
> that discussion, does anyone here know where I might have read that,
> or have suggestions on if it's good to use [NSAppleScript
> executeAndReturnError:] from within a cocoa application.


One problem with -executeAndReturnError: is that it still doesn't save
persistent properties in the script. That's a bug.

--

Bill Cheeseman - <email_removed>
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes

Related mailsAuthorDate
mlbetter alternative to [NSAppleScript executeAndReturnError:] for executing scripts in scripts menu Jesse Grosjean Aug 1, 20:19
mlRe: better alternative to [NSAppleScript executeAndReturnError:] for executing scripts in scripts menu Bill Cheeseman Aug 1, 23:50