• 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
Itunes - persistent ids not unique (or, managing double integers)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Itunes - persistent ids not unique (or, managing double integers)


  • Subject: Itunes - persistent ids not unique (or, managing double integers)
  • From: Andrew Bush <email@hidden>
  • Date: Sat, 11 Mar 2006 13:15:59 +1300

Hi all,

Ive got some applescript that is supposed to find a track, given its persistent id.

looking at the persistent ids of all the tracks in the xml file produced by itunes, they are all different - as expected, and appear to be alphanumeric.

however running the code below finds every track in the library.

I assume this is because somehow the persistent id is somehow being mangled or coerced into a different type.

Its type is listed as being double integer in the itunes dictionary.

I am running this applescript on 10.3.9 against the latest version of itunes.

so, what am I doing wrong?  any suggestions welcome.

tell application "iTunes"
	tell playlist "Library1"
		set t to track 1
		set pid to (t's persistent ID)

	--	display dialog (dbid as double integer)
		set t to (every track whose persistent ID is pid)
		repeat with this_track in t
			display dialog (the name of this_track as string)
		end repeat
	end tell
end tell


yours cheerfully,


Andrew Bush

_______________________________________________
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 - persistent ids not unique (or, managing double integers)
      • From: Stan Cleveland <email@hidden>
  • Prev by Date: Re: ANNOUNCE: Script Debugger 4.0.1 -- FEW POINTS
  • Next by Date: Re: Itunes - persistent ids not unique (or, managing double integers)
  • Previous by thread: Re: Simple Script Request
  • Next by thread: Re: Itunes - persistent ids not unique (or, managing double integers)
  • Index(es):
    • Date
    • Thread