Sign in to follow this  
Followers 0
gammasts

COM and iTunes

4 posts in this topic

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")
$iTunesx.PlayPause

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.

Parameters:

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_POINTER iTrack is NULL.

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



Bump?

Share this post


Link to post
Share on other sites

Hi,

My server script in the ZIP file in this thread does exactly what you're looking for.

Alex

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  
Followers 0