View Full Version : Message Dialog
DarrellBlack
03-22-2005, 12:22 PM
Is there a LUA command to popup (display) a dialog message like the Dialog.TimedMessage that will allow the installer to keep running while it is displaying? I would like the Timed message to work like file.run with an option to wait for return or not. Is this possiable today? I do not use screens as everything is done completely in the actions area.
StatusDlg is probably what you're looking for. You can hide it, and show it at will.
Worm is right, the StatusDialog action should fit your needs properly.
Adam Kapilik
DarrellBlack
03-22-2005, 03:04 PM
I tried the simple
StatusDlg.ShowProgressMeter(true);
before starting to zip a large file (about 30 seconds in time)
after I place the StatusDlg.Hide(); I was hoping for a process bar to popup and start to move or not move. I did not see this. I also read over the docs but do not understand it. Can you give a me a line or two that works? I can run with it from there.
First how does it know the size so it knows how to show 0 - 100%?
I would be happy with a popup timer, bar graph that goes back and forth or just change cursor so the user knows it is still running.
HMMurdock
03-22-2005, 03:27 PM
After poking around with it I used the following:
function fcnZipCallback(String,Percent)
if(bCancelled)then
-- Abort the download...
return false;
end
if Percent == 100 then Count1 = Count1 + 1; end
TotalComplete = ((Count2 + Percent) / file_num);
Count2 = Count1 * 100;
DlgProgressBar.SetPos(CTRL_PROGRESS_BAR_01,TotalCo mplete);
DlgProgressBar.SetPos(CTRL_PROGRESS_BAR_02,Percent );
return true;
end
That function was used on the "On Start" action of a progress bar screen. This allowed me to have 2 progress bars, Individual file progress and Total Progress (not entirely accurate unless all files being zipped are the same size, but it still gives the desired effect)
The code I called the function with looks like this...
FileTable = { insert file list here }
file_num = Table.Count(FileTable);
Zip.Add( insert zip filename here ), FileTable, false, "", 5, fcnZipCallback, true);
I hope this helps. (I realize there is probably a better way to incriment the counters to do the total complete, but this did eventually work for me.
HMMurdock
03-22-2005, 03:46 PM
I forgot to mention... all of the counter variables (count1, count2 and TotalComplete) were initialized at 0
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.