jaberwacky Posted August 13, 2010 Share Posted August 13, 2010 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. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Richard Robertson Posted August 13, 2010 Share Posted August 13, 2010 You use the ObjEvent function to register handlers for COM object events. Link to comment Share on other sites More sharing options...
jaberwacky Posted August 13, 2010 Author Share Posted August 13, 2010 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! Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now