PDA

View Full Version : Progress Screen (not dlg) for copying creating Zips


HMMurdock
03-08-2005, 02:41 PM
I've currently got a setup util that can create a zip file during the install process. It currently shows several small dialog boxes with status bars as they zip.

Pretty straightforward, I know, but here is the code
Zip.Add(SessionVar.Expand("%AppFolder%\\Backup.zip"), FileTable, false, "", 5, nil, true);
I'd like to use a 2-bar Progress Screen (Top for total progress, Bottom for individual files) instead of the dialog boxes. I'm not quite savvy enough yet to figure out how to make this happen. Do I need to write a Function to do it? Honestly, I'm not sure how to identify the Control ID for the progress bars when I add them to the Screens list.

Basically I've hit my first wall, and I'm hoping someone here can point me in the right direction.

Thanks!

HMMurdock
03-08-2005, 04:06 PM
Well, I'm flailing along at this, and here is what I have so far. I've got progress bars, but they aren't quite working right...

Here's the function I'm using:

function fcnZipCallback(String,Percent)
SessionVar.Set("%DBFileName%", String)
if(bCancelled)then
-- Abort the download...
return false;
end
DlgStaticText.SetProperties(CTRL_STATICTEXT_LABEL_ 01,{Text= "Backup Status"});
DlgStaticText.SetProperties(CTRL_STATICTEXT_LABEL_ 02,{Text= SessionVar.Expand("%DBFileName%")});

if(Percent > 0)then
TotalComplete = TotalComplete + (Percent / 8);
end

DlgProgressBar.SetPos(CTRL_PROGRESS_BAR_01,TotalCo mplete);
DlgProgressBar.SetPos(CTRL_PROGRESS_BAR_02,Percent );

return true;
end


My top Status bar isn't working (properly) it seems to advance faster than the bottom. (it should advance at 1/8th the speed of the bottom, as it's zipping 8 files in total)

The bottom status bar works great, but it's not displaying the filenames. (interetingly enough, I accidentally had it on the top bar, and it worked fine there... moved it to the bottom... now I get nothing)

I'll continue to play around with it, but if anyone sees any obvious mistakes I'll happily take any input.

Thanks