• 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: NSAppleScript question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAppleScript question


  • Subject: Re: NSAppleScript question
  • From: "Ken Ferry" <email@hidden>
  • Date: Wed, 4 Jun 2008 11:22:36 -0700

Hi Matthew,

It is possible, but it requires either extra libraries or
understanding apple events to some extent.

An easier way to go, if you can require 10.5, is to use the Scripting
Bridge instead of NSAppleScript.
<http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptingBridgeConcepts/index.html>

If you don't want to require 10.5, there are a number of 3rd party
chunks of code that can help you out.  I have one:
<http://homepage.mac.com/kenferry/software.html#KFAppleScript>.

Using that, you write code that looks like this:

[iTunesControllerScpt executeHandler:@"num_albums_by_artists"
                                      withParameters:@"Artist1",
@"Artist2", nil];

-Ken

On Wed, Jun 4, 2008 at 4:09 AM, Matthew Delves <email@hidden> wrote:
> Greetings and salutations,
> Is there a way to pass arguments into an AppleScript file using
> NSAppleScript and other cocoa/obj-c classes?
>
> The reason that I ask is I am wanting to find out the path to a song in
> iTunes. I have a script which does this for hard coded values, though am
> uncertain as to how to accomplish it (or if it is indeed possible) using
> NSAppleScript.
>
> Thanks,
> Matthew Delves
> _______________________________________________
>
> 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
>
_______________________________________________

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: 
 >NSAppleScript question (From: Matthew Delves <email@hidden>)

  • Prev by Date: Re: NSAppleScript question
  • Next by Date: Re: The KVO Race
  • Previous by thread: Re: NSAppleScript question
  • Next by thread: Re: NSAppleScript question
  • Index(es):
    • Date
    • Thread