Triggering custom script events

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

flashk
Posts: 188
Joined: Sun Dec 11, 2005 5:04 pm

Triggering custom script events

Post by flashk » Wed Sep 16, 2009 4:36 pm

Is it possible to create custom script events and trigger them manually from different scripts?

For example, I would like one script to register for the custom event like this:

Code: Select all

' Register for custom event
Script.RegisterEvent SDB, "OnMyCustomEvent", "MyCustomEventHandler"
Then have a different script trigger the event:

Code: Select all

' Trigger custom event
Script.TriggerEvent SDB, "OnMyCustomEvent", args
This would make it really easy for different scripts to communicate with each other.

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Triggering custom script events

Post by trixmoto » Thu Sep 17, 2009 3:13 am

No I don't think this is possible, but it is a good idea! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Post Reply