• 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: iTunes location parameter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes location parameter


  • Subject: Re: iTunes location parameter
  • From: Jeffrey Mattox <email@hidden>
  • Date: Wed, 14 Jun 2006 16:40:42 -0500

Perhaps I wasn't clear. The first line (setting the location) works. It's the second line when I use the location to get something else fails. (This is part of a much more complicated application -- I have a bunch of locations, now I need more information about them.)

For example, say I want to do this when I already have the location of the track in theLoc:

tell application "iTunes"
set n to name of (first file track of playlist "Library" where location is theLoc)
end tell


That does not work.

Jeff


At 5:18 PM -0400 6/14/06, J. Stewart wrote:
On 6/14/06 at -0500 Jeffrey Mattox said this

Why does this fail?

    tell application "iTunes"
       set theLoc to location of first file track of playlist "Library"
       get (first file track of playlist "Library" where location is theLoc)
     end tell

Results: "iTunes got an error: A descriptor type mismatch occurred."


Either of the following forms will work -

--> Cut <--
tell application "iTunes"
	set thetrk to first file track of playlist "Library"
	set theLoc to location of thetrk
end tell
--> Cut <--

--> Cut <--
tell application "iTunes"
	set theLoc to location of (get first file track of playlist "Library")
end tell
--> Cut <--

JBS
_______________________________________________
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


  • Follow-Ups:
    • Re: iTunes location parameter
      • From: Martin Orpen <email@hidden>
References: 
 >Re: iTunes location parameter (From: "J. Stewart" <email@hidden>)

  • Prev by Date: Re: Photoshop CS2 overall scriptability
  • Next by Date: Re: XML Suite Documentation
  • Previous by thread: Re: iTunes location parameter
  • Next by thread: Re: iTunes location parameter
  • Index(es):
    • Date
    • Thread