Show a text file within a section
Hi!
I like the look and feel of the LicenseData screen but why can't it show a text file within a section? Are there any other functions that can do that?
---
mw
Archive: Show a text file within a section
Show a text file within a section
Hi!
I like the look and feel of the LicenseData screen but why can't it show a text file within a section? Are there any other functions that can do that?
---
mw
Hi Mattias,
some possibilities:[list=1][*]Load the text into variables and use some huge messagebox.[*]Use
ExecWait "$WINDIR\notepad.exe $EXEDIR\prob.txt"
to display into the notepad editor.[*]Use a listbox of Install Options.[*]Or look at my solution, attached to this reply.[/list=1]BTW, solution item 3 is not preferred, because a listbox does not have a scrollbar, so scrolling becomes cumbersome. Besides that, it actually is not designed for this purpose, that's why I tried to use labels instead.
Greetz, Hendri.
Ok, I added the check for EOL and also an extra line to diplay, 15 at max now.
Rename prob1.txt to prob.txt and run the program prob.exe again to see the max number of lines.
Good luck, greetz from Holland,
Hendri.
CallInstDLL solved the problem
Hi!
I solved the problem with a DLL. I wrote a simple function that takes three arguments, a file name, a caption and button options. Then call it from the script with CallInstDLL. Simple really!
Example:
StrCpy $0 "Conf.txt"
StrCpy $1 "Setup your PDA"
StrCpy $2 "MB_OK|MB_STOP"
CallInstDLL IDNETEX.DLL showTextFile
Now there is only one problem left. How can I get information from the DLL back to the script. Using the stack was my first thought but doesn't seem to work. Anyone else?
---
mw
Just set a user variable like $0. The seruservar function may not be in the example dll but it should be in install options.
A dll is also possible, I wanted to show a solution within NSIS framework.
-Hn3.
Sure I understand. My solution must distribute the DLL with setup-package. What is the most efficient solution to that problem? A self-extracting auto-starting zip-archive or what? Any ideas?
I think, you best pack it together with the install data and compare zlib and bzip2 compression. This is quick and quite OK. Furthermore, use UPX to compress the exehead.
-Hn3.