guestscripter Posted October 2, 2006 Share Posted October 2, 2006 I've looked through the documentation but can't find anywhere how to get the title of the currently selected tracks. If anybody could get me a little script that makes me an array of all selected tracks that would be awesome I'd be very grateful. Any other advice would also be great ImageSearch15.au3 featuring _ImageSearchStartup() and _ImageSearchShutdown() Link to comment Share on other sites More sharing options...
lod3n Posted October 2, 2006 Share Posted October 2, 2006 (edited) I don't have iTunes, because I don't have an iPod, because I don't buy DRM, because that's just plain retarded, so i can't test this:#include <Array.au3> Dim $aSelTracks[1] $iTunesApp = ObjCreate("iTunes.Application") for $track in $iTunesApp.SelectedTracks _ArrayAdd($aSelTracks,$track.Location) $aSelTracks[0] = Ubound($aSelTracks) Next _ArrayDisplay ($aSelTracks, "Selected Tracks" )Edit: sorry, you said you wanted it in an array, so I modified it. Edited October 2, 2006 by lod3n [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
guestscripter Posted October 2, 2006 Author Share Posted October 2, 2006 (edited) I don't have iTunes, because I don't have an iPod, because I don't buy DRM, because that's just plain retarded, so i can't test this:#include <Array.au3> Dim $aSelTracks[1] $iTunesApp = ObjCreate("iTunes.Application") for $track in $iTunesApp.SelectedTracks _ArrayAdd($aSelTracks,$track.Location) $aSelTracks[0] = Ubound($aSelTracks) Next _ArrayDisplay ($aSelTracks, "Selected Tracks" )Edit: sorry, you said you wanted it in an array, so I modified it. Well thanks a lot for helping me out with that. I'll test it out later and it looks good to me. Sorry im not that good with autoit even though I've known it for over a year now. Hope I can return the favour somehow someday Edited October 3, 2006 by yaziquex ImageSearch15.au3 featuring _ImageSearchStartup() and _ImageSearchShutdown() Link to comment Share on other sites More sharing options...
guestscripter Posted October 3, 2006 Author Share Posted October 3, 2006 Just to clarify... I haven't actually tested yet, but from the script I understand that when you create the object $track gains some value automatically? And that because you used .Location you're giving me the location of each song? I'll just have to test it I guess... ImageSearch15.au3 featuring _ImageSearchStartup() and _ImageSearchShutdown() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now