Search the Community
Showing results for tags 'itunes com'.
-
Hi everyone, I've been an AutoIt user for 10 years, on and off. I've done tons of stuff with it, but I've never done anything with COM. As they say, need is the mother of invention, so now I'm trying to automate iTunes. Here's my situation: I use MythTV to record everything and transcode it into AppleTV format, which then drops it into iTunes. iTunes acts as the media manager. Unfortunately there's no way to auto-remove recordings that I've watched and don't want anymore. So I'm trying to write an AutoIt script that pulls the list of shows from a smart playlist, currently called test (the smart playlist is to make it easier to control what shows get removed), and deletes the files from the library and the disk. Here's what I have so far. It works down to the for statement. $objApp = ObjCreate("iTunes.Application") $colSources = $objApp.Sources $objSource = $colSources.ItemByName("Library") $colPlaylists = $objSource.Playlists $objPlaylist = $colPlaylists.ItemByName("Test") for $TRACK in $objPlaylist.Tracks $objPlaylist.LibraryPlaylist.Tracks.ItemByName($TRACK).Delete Next I've downloaded all the examples I can find but I am really stuck. I can script fairly well, but COM seems to be beyond me. I'd appreciate some help with getting this written and working. I don't post very often so I wasn't sure if I should put this in the COM forum, but since it's not AutoITX I decided to try here. Thanks!