Jump to content

Recommended Posts

Posted

The documentation for the iTunes COM Interface supplied with the iTunes SDK says that after you create the iTunes object (objCreate(iTunes.Application") that the other class interfaces will be available through that object. If I have not misunderstood then how would one go about accessing the iTunesEvents class? I tried various things such as:

$iTunesApp = ObjCreate("iTunes.Application")
$iTunesApp.iTunesEvents.onSoundVolumeChangedEvent()

; ===============================

$iTunesEvents = ObjGet($iTUnesApp, "various combinations of the iTunesEvents permutations I could conceive")

and more that I've forgotten. What I'd like to know is if it is possible to access this class and if so how?

Of course any helpful response will be much appreciated. Goodnight.

Posted

Based on what you told me I got this:

#include <IE.au3>

_IEErrorHandlerRegister()

$iTunesApp = ObjCreate("iTunes.Application")

ObjEvent($iTunesApp, "iTunesEvent")

Sleep(1000)

$iTunesApp.PlayPause

Sleep(3000)

$iTunesApp.SoundVolume = 10

Sleep(3000)

$iTunesApp.SoundVolume = 60

Sleep(3000)

$iTunesApp.PlayPause

Sleep(3000)

$iTunesApp.Quit

$iTunesApp = ''

Func iTunesEvent(Const $event)
    ConsoleWrite("iTunesEvent: " & $event & @LF)
EndFunc

YES! Thanks RichardRobertson!

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
×
×
  • Create New...