![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | iTunes scripting I found the article on scripting to iTunes very interesting http://www.microsoft.com/technet/scr...e/default.mspx Has anyone here done much with it? I'm trying to figure out how to determine if a track is a podcast.. I get all tracks in the entire library, and haven't yet gotten to the place where I can filter out things that were downloaded as podcasts. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: iTunes scripting Chip wrote: Quote: > I found the article on scripting to iTunes very interesting > > http://www.microsoft.com/technet/scr...e/default.mspx > > Has anyone here done much with it? I'm trying to figure out how to > determine if a track is a podcast.. I get all tracks in the entire > library, and haven't yet gotten to the place where I can filter out > things that were downloaded as podcasts. http://developer.apple.com/sdk/itunescomsdk.html Simply check the .Podcast property, if true it is a podcast. I just modifified the RemoveDeadTracks.js example from the sdk. Should be no problem to adapt it to vbs: /* File: CountPodcastTracks.js */ var ITTrackKindFile = 1; var iTunesApp = WScript.CreateObject("iTunes.Application"); var PodcastTracks = 0; var mainLibrary = iTunesApp.LibraryPlaylist; var tracks = mainLibrary.Tracks; var numTracks = tracks.Count; var i; while (numTracks != 0) { var currTrack = tracks.Item(numTracks); // is this a file track? if (currTrack.Kind == ITTrackKindFile) { // yes, is it a podcast? if (currTrack.Podcast) { // yes, delete it WScript.Echo("Podcast: "+currTrack.Name+" "+currTrack.Location); PodcastTracks++; } } numTracks--; } WScript.Echo("Counted " + PodcastTracks + " podcast track(s)."); HTH Matthias |
My System Specs![]() |
| | #3 (permalink) |
| | Re: iTunes scripting Great thanks! I did download the SDK, but I didn't see Podcast as being a property of the Track.. I still don't.. But it works.. I don't know what I'm missing in the documentation. "Matthias Tacke" <Matthias@xxxxxx> wrote in message news:6spq1hF7k2baU1@xxxxxx Quote: > Chip wrote: Quote: >> I found the article on scripting to iTunes very interesting >> >> http://www.microsoft.com/technet/scr...e/default.mspx >> >> Has anyone here done much with it? I'm trying to figure out how to >> determine if a track is a podcast.. I get all tracks in the entire >> library, and haven't yet gotten to the place where I can filter out >> things that were downloaded as podcasts. > Did you download the iTunesComSDK at: > http://developer.apple.com/sdk/itunescomsdk.html > > Simply check the .Podcast property, if true it is a podcast. > > I just modifified the RemoveDeadTracks.js example from the sdk. > Should be no problem to adapt it to vbs: > > /* > File: CountPodcastTracks.js > */ > var ITTrackKindFile = 1; > var iTunesApp = WScript.CreateObject("iTunes.Application"); > var PodcastTracks = 0; > var mainLibrary = iTunesApp.LibraryPlaylist; > var tracks = mainLibrary.Tracks; > var numTracks = tracks.Count; > var i; > while (numTracks != 0) > { > var currTrack = tracks.Item(numTracks); > // is this a file track? > if (currTrack.Kind == ITTrackKindFile) > { > // yes, is it a podcast? > if (currTrack.Podcast) > { > // yes, delete it > WScript.Echo("Podcast: "+currTrack.Name+" "+currTrack.Location); > PodcastTracks++; > } > } > numTracks--; > } > WScript.Echo("Counted " + PodcastTracks + " podcast track(s)."); > > > HTH > Matthias |
My System Specs![]() |
| | #4 (permalink) |
| | Re: iTunes scripting Chip wrote: Quote: > > Great thanks! I did download the SDK, but I didn't see Podcast as > being a property of the Track.. I still don't.. But it works.. I > don't know what I'm missing in the documentation. > listed in the IITFileOrCDTrack Interface Reference. You can look for properties and methods in the Index or Search tabs of the Contents pane. (You might have the Contents pane hidden. Just click the Show button to get the Contents.) -- Steve Never let your sense of morals get in the way of doing what's right. -Isaac Asimov |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| VB scripting help | VB Script | |||
| itunes corrupted .wmv files can't play with Media Player or itunes | Vista music pictures video | |||
| Itunes has constant "itunes has stopped working" problem!! | Vista music pictures video | |||
| once iTunes looses the input focus, the CDROM device disappears inthe iTunes application | Vista General | |||
| iTunes authorization problem (iTunes 7.0.1.8, Vista build 5728) | Vista music pictures video | |||