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

Re: noob question


  • Subject: Re: noob question
  • From: Andrew Oliver <email@hidden>
  • Date: Sun, 06 Mar 2005 15:44:01 -0800

On 3/6/05 3:35 PM, "Michael J. Sherman" <email@hidden> wrote:

>
> Hi folks.
>
> All I'm trying to do is add a file to iTunes.  I'm trying something
> like this:
>
> tell application "iTunes"
>   add "Macintosh HD:Users:Michael:file.mp3" to playlist "New"
> end tell
>
> But I get the error:
> iTunes got an error: "Macintosh HD:Users:Michael:file.mp3" doesn't
> understand the add message.
>
> Can someone please assist?  What am I doing wrong?

What you're doing wrong is trying to add a string to your playlist.

Just because we humans can look at "Macintosh HD:Users:Michael:file.mp3" and
assume it's a file path, iTunes makes no such assumptions.

You need to tell iTunes that what you're adding is a file reference:

> tell application "iTunes"
>   add alias "Macintosh HD:Users:Michael:file.mp3" to playlist "New"
> end tell

Andrew
:)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >noob question (From: "Michael J. Sherman" <email@hidden>)

  • Prev by Date: noob question
  • Next by Date: Re: setting default app for document
  • Previous by thread: noob question
  • Next by thread: Re: noob question
  • Index(es):
    • Date
    • Thread