Re: Should Cocoa apps pass parameters to AppleScript?
Re: Should Cocoa apps pass parameters to AppleScript?
- Subject: Re: Should Cocoa apps pass parameters to AppleScript?
- From: Jon Pugh <email@hidden>
- Date: Sun, 13 Jan 2008 20:15:05 -0800
At 12:55 PM +1100 1/14/08, Devraj Mukherjee wrote:
>Now should I consider passing parameters to the AppleScript or should
>I run the AppleScript from with the Cocoa app, the AppleScript in turn
>queries my application (so assuming that my Cocoa app responds to the
>AppleScript calls) and fetch vars out like that?
You should probably just send parameters to your scripts. I expect that currently you are executing a run handler via some OSAExecute variant. You would need to change that to run a specific handler with parameters via OSAExecuteEvent. If you're using Cocoa to run the script, you may need to run it yourself instead.
Here's some example code from Apple:
http://developer.apple.com/qa/qa2001/qa1111.html
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden