Snow Administrator
  
  
  Anmeldedatum: 21.11.2000 Beiträge: 1946 Wohnort: Deiningen
  | 
		
			
				 Verfasst am: 06.03.2004 - 16:55    Titel: iTunes - Track Properties | 
				     | 
			 
			
				
  | 
			 
			
				Da 'get properties of track...' anscheinend nicht funktioniert, habe ich mal die umständliche Methode gewählt und sämtliche Properties der Klasse 'track' abgefragt:
 
 
[url=applescript://com.apple.scripteditor/?action=new&script=tell%20application%20%22iTunes%22%0D%09set%20TrackList%20to%20every%20track%20of%20playlist%20%22Bibliothek%22%20whose%20name%20contains%20%22Longest%22%0D%09set%20theTrack%20to%20item%201%20of%20TrackList%0D%09tell%20theTrack%0D%09%09set%20theAlb%20to%20album%0D%09%09set%20theArt%20to%20artist%0D%09%09set%20TName%20to%20name%0D%09%09set%20theRat%20to%20bit%20rate%0D%09%09set%20theTemp%20to%20bpm%0D%09%09set%20theCom%20to%20comment%0D%09%09set%20tCompi%20to%20compilation%0D%09%09set%20tComposer%20to%20composer%0D%09%09set%20did%20to%20database%20ID%0D%09%09set%20AddedDate%20to%20date%20added%0D%09%09set%20discC%20to%20disc%20count%0D%09%09set%20discN%20to%20disc%20number%0D%09%09set%20theDur%20to%20duration%0D%09%09set%20TheEnabled%20to%20enabled%0D%09%09set%20tEQ%20to%20EQ%0D%09%09set%20theFinish%20to%20finish%0D%09%09set%20theGen%20to%20genre%0D%09%09set%20tGroup%20to%20grouping%0D%09%09set%20theKind%20to%20kind%0D%09%09set%20ModDate%20to%20modification%20date%0D%09%09set%20PlCount%20to%20played%20count%0D%09%09set%20PlDate%20to%20played%20date%0D%09%09set%20theRating%20to%20rating%0D%09%09set%20SampRate%20to%20sample%20rate%0D%09%09set%20tSize%20to%20size%0D%09%09set%20theStart%20to%20start%0D%09%09set%20theTime%20to%20time%0D%09%09set%20tTrackCount%20to%20track%20count%0D%09%09set%20tTrackNum%20to%20track%20number%0D%09%09set%20VolAdj%20to%20volume%20adjustment%0D%09%09set%20theYear%20to%20year%0D%09%09set%20tContainer%20to%20container%0D%09end%20tell%0D%09set%20theInfo%20to%20%7BtheAlb%2C%20theArt%2C%20TName%2C%20theRat%2C%20theTemp%2C%20theCom%2C%20tCompi%2C%20tComposer%2C%20did%2C%20AddedDate%2C%20discC%2C%20discN%2C%20theDur%2C%20TheEnabled%2C%20tEQ%2C%20theFinish%2C%20theGen%2C%20tGroup%2C%20theKind%2C%20ModDate%2C%20PlCount%2C%20PlDate%2C%20theRating%2C%20SampRate%2C%20tSize%2C%20theStart%2C%20theTime%2C%20tTrackCount%2C%20tTrackNum%2C%20VolAdj%2C%20theYear%2C%20tContainer%7D%0Dend%20tell]Panther-User klicken hier, um das Skript zu in den Editor zu laden[/url]
 
 
tell application "iTunes"
 
   set TrackList to every track of playlist "Bibliothek" whose name contains "Longest"
 
   set theTrack to item 1 of TrackList
 
   tell theTrack
 
      set theAlb to album
 
      set theArt to artist
 
      set TName to name
 
      set theRat to bit rate
 
      set theTemp to bpm
 
      set theCom to comment
 
      set tCompi to compilation
 
      set tComposer to composer
 
      set did to database ID
 
      set AddedDate to date added
 
      set discC to disc count
 
      set discN to disc number
 
      set theDur to duration
 
      set TheEnabled to enabled
 
      set tEQ to EQ
 
      set theFinish to finish
 
      set theGen to genre
 
      set tGroup to grouping
 
      set theKind to kind
 
      set ModDate to modification date
 
      set PlCount to played count
 
      set PlDate to played date
 
      set theRating to rating
 
      set SampRate to sample rate
 
      set tSize to size
 
      set theStart to start
 
      set theTime to time
 
      set tTrackCount to track count
 
      set tTrackNum to track number
 
      set VolAdj to volume adjustment
 
      set theYear to year
 
      set tContainer to container
 
   end tell
 
   set theInfo to {theAlb, theArt, TName, theRat, theTemp, theCom, tCompi, tComposer, did, AddedDate, discC, discN, theDur, TheEnabled, tEQ, theFinish, theGen, tGroup, theKind, ModDate, PlCount, PlDate, theRating, SampRate, tSize, theStart, theTime, tTrackCount, tTrackNum, VolAdj, theYear, tContainer}
 
end tell
 
 
Das Ergebnis sieht dann etwa so aus:
 
 
{"", "Acapella - Rockapella", "For the Longest Time", 128, 0, "", false, "", 95, date "Dienstag, 2. März 2004 23:29:28 Uhr", 0, 0, 209, true, "", 209, "", "", "MPEG-Tondatei", date "Dienstag, 28. August 2001 11:19:58 Uhr", 2, date "Samstag, 6. März 2004 15:29:55 Uhr", 0, 44100, 3357672, 0, "3:29", 0, 0, 0, 0, library playlist id 208 of source id 32 of application "iTunes"} _________________ Peter
 
-
 
Fischer-Bayern.de|Shadetreemicro.com | 
			 
		  |