• 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: Running AppleScripts from an App using NSAppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running AppleScripts from an App using NSAppleScript


  • Subject: Re: Running AppleScripts from an App using NSAppleScript
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 27 Apr 2015 09:48:15 -0700

> On Apr 27, 2015, at 6:52 AM, Dave <email@hidden> wrote:
>
> At the moment, I setup the Text for the Script, Compile it and then Run it each time. I’m wondering if there is anyway to be able to just compile the Script once, and then pass the Parameters to the Script as it seems a bit time-consuming to recompile each time when 99% of the Script is constant.

Define an event handler (“on …”) in the script and get the parameters out of it. Then call the script via -executeAppleEvent: passing it an AE descriptor containing the parameter values.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >Running AppleScripts from an App using NSAppleScript (From: Dave <email@hidden>)

  • Prev by Date: Running AppleScripts from an App using NSAppleScript
  • Next by Date: Sketch TNG Code?
  • Previous by thread: Running AppleScripts from an App using NSAppleScript
  • Next by thread: Re: Running AppleScripts from an App using NSAppleScript
  • Index(es):
    • Date
    • Thread