Cool!  Thank you, that sounds just the ticket.  I'll try it.  I 
have to admit I haven't put a lot of effort into this.

Paul Sanders.

----- Original Message ----- 
From: "Jens Alfke" <[email protected]>
To: "Paul Sanders" <[email protected]>
Cc: "Matt Neuburg" <[email protected]>; "Ramesh P" 
<[email protected]>; <[email protected]>
Sent: Tuesday, January 26, 2010 7:37 PM
Subject: Re: How to access iTunes using cocoa



On Jan 26, 2010, at 11:18 AM, Paul Sanders wrote:

> OK, thanks guys.  My script is pretty simple-minded: it just
> retrieves each track in turn and compares the artist and title
> with what I am looking for.  We're way off-topic now, but is
> there a better way?  I'm trying to avoid adding the same track
> to the library twice. Thanks.


tell app "iTunes"
first track whose name is "....." and artist is "...."
end

This will instantly return the track if it exists, or an 
error -1728
(not found).

—Jens 



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to