Jump to content

_IiTunesEvents


jaberwacky
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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!

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...