Load EULA dynamically?
Load EULA dynamically?
In the User Interface section, I see a way I can statically enter EULA text, but what I'd like to do is load that dynamically from a file. How can I do that?
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
You can set the receives information field for the control to nothing, set the lines property to a variable, and then use Read from Text File to populate that variable at runtime.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
I'm doing something wrong but I am not sure what. In the Form designer's Define Interactive Characteristics dialog, Object Behavior tab, I set RichEdit1's Receive Information combo to <none>. In script, I read RTF text from a file into a variable named LICENSETEXT. I can put a label on the dialog and set the label's caption to $LICENSETEXT, and that works fine, but I haven't found a way to successfully load RichEdit1.Lines.
I've tried using Object Rules tab in the Define Interactive Characteristics dialog, adding the rule: "If (RichEdit1.Visible = True) THEN RichEdit1.Lines := $LICENSETEXT$;". I've also tried "If (RichEdit1.Visible = True) THEN RichEdit1.Lines := LicenseLabel.Caption;" where LicenseLabel is the hidden label on the dialog that has its caption set to $LICENSETEXT$.
It compiles fine, but at runtime it gets 'Invalid property value'. So what's the trick of loading a RichEdit's Lines property?
I've tried using Object Rules tab in the Define Interactive Characteristics dialog, adding the rule: "If (RichEdit1.Visible = True) THEN RichEdit1.Lines := $LICENSETEXT$;". I've also tried "If (RichEdit1.Visible = True) THEN RichEdit1.Lines := LicenseLabel.Caption;" where LicenseLabel is the hidden label on the dialog that has its caption set to $LICENSETEXT$.
It compiles fine, but at runtime it gets 'Invalid property value'. So what's the trick of loading a RichEdit's Lines property?
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
Did you click the "..." button in the Lines property of the Object Properties window for the richedit control? That would be the correct approach for what you are trying to do.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
I assume you are saying I should set the Lines property to $LICENSETEXT$ so it'll load the contents of that variable? When I tried that, I got "RichEdit line insertion error".
When I tried loading LICENSETEXT with plain text instead of RTF, I don't get an error at runtime, but all I get is the first line of the license file. Is there some property that controls adding multiple lines that I'm missing? I have maxlength set to 0.
When I tried loading LICENSETEXT with plain text instead of RTF, I don't get an error at runtime, but all I get is the first line of the license file. Is there some property that controls adding multiple lines that I'm missing? I have maxlength set to 0.
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
How did you try to read in the RTF file? Sounds like you tried to read in a formatted file and that naturally caused an error. Read from Text File works well with plain text files, but might not fare so well with files containing binary data. Also it has a switch to enable reading in an entire file - so you don't have to code a loop for it. Just press F1 for the switch syntax while the window is showing.
You can also call CopyFileA or MoveFileA in kernel32.dll through Call DLL Function, renaming one of your multiple possible license files to the form InstallAware expects them in at runtime.
You can also call CopyFileA or MoveFileA in kernel32.dll through Call DLL Function, renaming one of your multiple possible license files to the form InstallAware expects them in at runtime.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 5 guests