IN the documentation, I find this about DoEvents: Just like Dialog(), but returns when there are no more events to process.
So does that mean that if you leave your window alone, control will return to the script? So to keep your script from exiting as soon as you stop clicking buttons, etc. you'd have to do something like this: $keep_running = 1; Win32::GUI::DoEvents while ($keep_running); and then do something in one of your events that changes $keep_running. So wouldn't it be easier just to use Dialog and have that event return -1? I guess what I'm really asking here is, what are the pros and cons of DoEvents over Dialog? And if someone could provide an example of a script that uses DoEvents, that would be good.