Jump to content
Sign in to follow this  
guestscripter

iTunes interfacing

Recommended Posts

guestscripter

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

Share this post


Link to post
Share on other sites
lod3n

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 by lod3n

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Share this post


Link to post
Share on other sites
guestscripter

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 by yaziquex

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×