spkelly86
20th September 2012 20:41 UTC
Textfile to Textbox installoptions
I have been trying to take data from a text file created by the installer and then printing that file to a textbox on my custom finish page. I am trying to use the nsRichEdit which I found on the forum to do this but I'm having a little trouble understanding how the function works. If there is an easier way to do this please let me know. This is all I have so far. I'll read more to try to figure it out but any help would be appreciated.
What I have so far:
Function FinishPage
!insertmacro MUI_INSTALLOPTIONS_READ $0 ${FINISH_PG} "Field 1" "HWND"
nsRichEdit::Load $0 "$DOCUMENTS\temp\item_list.txt
!insertmacro MUI_INSTALLOPTIONS_DISPLAY ${FINISH_PG}
FunctionEnd
Afrow UK
20th September 2012 22:55 UTC
If it is a regular text box then you cannot use nsRichEdit. The plug-in is for rich edit controls only. For plain text, just read the file into a variable using FileRead (limited to 1024 characters). If that limit is too low, considering using a rich edit control instead (switch to MUI2 and nsDialogs).
Stu
Afrow UK
20th September 2012 23:02 UTC
If you want to load the license page with an external file you can use nsRichEdit for that too. It will not be limited by NSIS_MAX_STRLEN either (and uses EM_STREAMIN).
Stu
spkelly86
21st September 2012 01:41 UTC
Thanks for all the info I decided to just create a file for the user to view as opposed to adding it to the text box in the finish page. :)