• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Should Cocoa apps pass parameters to AppleScript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Should Cocoa apps pass parameters to AppleScript? (From: "Devraj Mukherjee" <email@hidden>)

  • Prev by Date: Re: Barcode Reader
  • Next by Date: Re: Should Cocoa apps pass parameters to AppleScript?
  • Previous by thread: Should Cocoa apps pass parameters to AppleScript?
  • Next by thread: Re: Should Cocoa apps pass parameters to AppleScript?
  • Index(es):
    • Date
    • Thread