Sign in to follow this  
Followers 0
mladost1

iTunes OBJ event handling

4 posts in this topic

Hey i'm doing a simple script which maps a few basic iTunes functions to hotkeys on my notebook. However, every time I close iTunes this pop-up appears saying that a script is attached to it. I know it throws an event when i click the close (X) button and if i am able to catch this event I will close the script before that and the pop-up won't show.

Anyway, there's the script:

$obj=ObjCreate("iTunes.Application")
$event=ObjEvent($a,"MyITevents_","ITEventTest_")

Func MyITevents_OnQuittingEvent()
    MsgBox(0,"iTunes closing","Script is also doing that")
    Exit
EndFunc

Any help is welcome :)

Share this post


Link to post
Share on other sites



Something like this should work.

$oiTunes = ObjCreate("iTunes.Application")
$oiTunesEvent = ObjEvent($oiTunes, "_Event_")

Func _Event_OnQuittingEvent()
    ; Do something
EndFunc   ;==>_Event_OnQuittingEvent

It may be worth taking a look at my Absolute Lyrics Finder script, it has a great deal of iTunes automation.

Share this post


Link to post
Share on other sites

Doesn't work I tried it :)

Share this post


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
Sign in to follow this  
Followers 0