At 06:31 AM 7/21/2003, you wrote:
Forget the timer ( in this situation)sub Button_click { my $var =1; while ($var) #####long running loop { #### Do somestuff here and then repeat Win32::GUI::DoEvents(); $var =0; } }"JUDICIOUS" use of DoEvents will help as long as you are not actually running a blocking I/O type call such as waiting on an open socket for data. If you are just doing alot of single actions in a loop, then DoEvents is what you need. I would even suggest building a cancel button on your page that is hidden until the loop stuff is started. Of course, if you do that, you need to make sure that $var is in a scope that will pass into Button_click and stop the execution on its next check.
Thanks. I had thought about something like that but DoEvents() was not in my documentation. I agree this is a better (in my situation) solution.
pgpE1kt2xp0Aa.pgp
Description: PGP signature