In a ScriptUI Window different components are usually registered for Events, and fire their own Handlers. You can build some interconnection, so for instance a Button's 'click' handler triggers a change in a ListBox, which in turn reacts to its own 'onChange' Event. It's quite easy to decouple this interaction, provided that you set up your code properly.
Posts Tagged - Event
In your code you may need to run a ScriptUI component's callback, or simulate a user interaction, maybe as a part of a subroutine. There are few ways to do this, with slight differences in the behavior: directly, using call(), notify() or dispatchEvent() - I've set up a commented demo Dialog that shows them all.