PDA

View Full Version : On Click and On Mouse events not working for me


kraigyb
11-03-2005, 02:33 PM
I'm using a for loop to run a bunch of installers (created with SUF7!). I would like to provide the end user a way to break out of the loop by clicking a Stop button. My problem is that the Stop button's On Click event and even the page's On Mouse event do not register while the installations are in progress. I'm also using the Timer, which does work while the installations are in progress, to keep track of the running time.

What I'm not sure about, is if the for loop is preventing the click events or if its the File.Run-Wait for Return?

Page.StartTimer(60000) --Timer event updates and displays the running time
for ProgramNumber,Item in ProgramTable do
if StopButtonClicked then break --The "Stop" button's On Click event sets this variable
end
File.Run(SetupSrcPath .. "\\" .. Item.File, Item.Args, "", SW_SHOWNORMAL, true)
end
Page.StopTimer()
Much thanks,
Craig

Worm
11-03-2005, 02:40 PM
using a for loop like that will hi-jack the application.

You'll need to incorporate that sort of testing within the page timer so that the time slices will be released to the app for it to properly handle other events.