Jump to content

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")
$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)

Link to post
Share on other sites
  • 1 month later...
  • 10 months later...

If you want try using memory functions.

I've found the now playing name/artist/album etc. using CheatEngine (memory searcher) before.

Haven't managed to get it into a string in autoit though yet

COM is probably better in the end but memory seems to be more versatile

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...