|
#1
|
|||
|
|||
|
I am doing a File.Copy and displaying the statusDlg is nice but I want to set the title. From best I can get, I need to create a function and call that function to do that. (if that is wrong please correct me) Problem is when I call the function I loose the rest of the statusdlg display info, aka the
Copy to info was nice, and I also loose the progress of the file copy, I am copying enough that the progress of the file copy info nice to display the users. I have tired setting some of the other options but with no luck. If someone has a working example that would be great or if you can point out what’s wrong with my code. cliniccount="clinic count" clinicname="clinic name" clinicname = Dialog.Input(clinicname.." ".."1 of "..cliniccount.." ".."Is entered next Please enter the next Clinic", "Clinic Name", "", MB_ICONQUESTION) function copydisplay() StatusDlg.SetTitle("SetTitle..Installing"..clinicn ame); return end Folder.DeleteTree("C:\\test\\junk") Folder.Create("C:\\test") Folder.Create("C:\\test\\junk") appfolder="C:\\test\\junk" StatusDlg.Show(MB_ICONNONE, false) File.Copy("C:\\test\\*.*", appfolder, true, true, false, true, copydisplay) Last edited by Jason Pate; 10-09-2004 at 06:55 PM. Reason: typo |
|
#2
|
||||
|
||||
|
I don't think you need a callback function to set the title bar...just do this:
Code:
StatusDlg.Show(MB_ICONNONE, false);
StatusDlg.SetTitle("Installing"..clinicname);
File.Copy("C:\\test\\*.*", appfolder, true, true, false, true, nil)
Code:
function copydisplay(strSource, strDestination, nCopied, nTotal)
-- put actions in here to display the progress how you want
return;
end
__________________
--[[ Indigo Rose Software Developer ]] |
|
#3
|
|||
|
|||
|
function filecopy()
--INIFile.GetValue(SessionVar.Expand("%AppFolder%\\s ettings.ini"), count, Clinic) StatusDlg.Show(MB_ICONNONE, false); StatusDlg.SetTitle("Installing"..clinicname); File.Copy(SessionVar.Expand("%AppFolder%\\*.*"), appfolder, true, true, false, true, nil)--funfilecopydisplay end I am calling this as a function under the resorces menu. But each time I run it the title is still Copying. |
|
#4
|
||||
|
||||
|
Try this instead:
Code:
function filecopy()
--INIFile.GetValue(SessionVar.Expand("%AppFolder%\\settings.ini"), count, Clinic)
StatusDlg.SetTitle("Installing"..clinicname);
StatusDlg.Show(MB_ICONNONE, false);
File.Copy(SessionVar.Expand("%AppFolder%\\*.*"), appfolder, true, true, false, true, nil); --funfilecopydisplay
end
__________________
--[[ Indigo Rose Software Developer ]] |
|
#5
|
|||
|
|||
|
No luck I am starting to feel like this is a BUG of some kind. I tried ALL weekend every different way I could to change this with no luck of getting it right at all.
If I get the title changes I loose the progress bar and everything else and that is inconstant. I do appericate your help. any idea's? Quote:
|
|
#6
|
||||
|
||||
|
Hi Jason,
This is actually by design, it was designed this way to make the process as simple as possible. What is happening is because you are showing the Status Dialog and then running File.Copy() without the callback, Setup Factory is taking control of the status dialog and setting all text to appropriate values for the operation. Setup Factory is setting the title of the dialog to be the localized string: MSG_COPYING If you want to customize the title of the status dialog try something like the following code: Code:
--Get the Localized string to set it back later
strLocString = SetupData.GetLocalizedString("MSG_COPYING");
--Change the localized string to your title
SetupData.SetLocalizedString("MSG_COPYING","Installing"..clinicname);
StatusDlg.Show(MB_ICONNONE, false);
File.Copy(SessionVar.Expand("%AppFolder%\\*.*"), appfolder, true, true, false, true, nil);
--Reset the localized string
SetupData.SetLocalizedString("MSG_COPYING",strLocString);
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#7
|
||||
|
||||
|
Sorry Jason, I was wrong...in order to change the title like that, you'll need to use a callback function or temporarily change the message string like Mark suggested.
There must be a difference between the SF7 in my head and the SF7 that actually exists. ![]() Sorry about that.
__________________
--[[ Indigo Rose Software Developer ]] |
|
#8
|
|||
|
|||
|
Mark,
Thank you that worked!!! And its totally what I have been looking for. |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 01:30 AM.









Linear Mode
