Jump to content

iTunes outgoing interfaces (events) not all working


Recommended Posts

Has anyone done any projects that utilize iTunes Event callbacks. I am and they all don't seem to work.

I am trying to time the ripping of a CD so I start the ripping using the ConvertTracks2() function and I set a callback funtion using the OnConvertOperationCompleteEvent(). I never receive a callback to my function ITEvent_OnConvertOperationCompleteEvent(). I next tried the OnConvertOperationchangeEvent() to see if that would work but it does not. Just to verify some callback functionality with iTunes a coded a simple test using the OnQuittingEvent( ) and this one worked. Got any clues?

Thanks in advance!


$ITSourceKindAudioCD = 3

$begin = 0

$objApp = ObjCreate("iTunes.Application")

$SinkObject=ObjEvent($objApp,"ITEvent_") ; Assign events to UDFs starting with IEEvent_

If @error = 1 Then

MsgBox(0, "failed", "Event binding failed", 30)


$colSources = $objApp.Sources

$begin = TimerInit()

For $objSource in $colSources

If $objSource.Kind = $ITSourceKindAudioCD Then

$strName = $objSource.Name

$colPlaylists = $objSource.Playlists

$objPlaylist = $colPlaylists.ItemByName($strName)

$colTracks = $objPlaylist.Tracks





; Wait around for the ripping to complete

Until False

func ITEvent_OnConvertOperationCompleteEvent()

$dif = TimerDiff($begin)

MsgBox(0,"Time Difference",$dif)



func ITEvent_OnConvertOperationStatusChangedEvent($trackName, $progressValue, $maxProgressValue)

MsgBox(0, "Convert", "Change event", 10)


Link to comment
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...