Jump to content
Sign in to follow this  

COM and iTunes

Recommended Posts

Hey, I am trying to retrieve the currently playing song from iTunes, unfortunetly I find any other way to retrieve it except from COM.

I don't know though, how to deal with this one particular COM function though

So far I have this and it all works fine:

$iTunesx = ObjCreate("iTunes.application")

It will open iTunes and then hit play/pause.

The one function though requires a parameter to store the track name in. Here is the documentation from the help file Apple provides of iTunes COM stuff:

HRESULT IiTunes::CurrentTrack ( [out, retval]IITTrack ** iTrack )

Returns the currently targeted track.


iTrack An IITTrack object corresponding to the currently targeted track. Will be set to NULL if there is no currently targeted track.

Return values:

S_OK The operation was successful.

S_FALSE There is no currently targeted track.


E_FAIL An unexpected error occurred.

How would I be able to retrieve this info through AutoIt?

(If you want the COM SDK stuff and help file for it: http://developer.apple.com/sdk/itunesvisualsdk.html)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...