Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 20th September 2012, 19:41   #1
spkelly86
Junior Member
 
Join Date: Sep 2012
Posts: 18
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
spkelly86 is offline   Reply With Quote
Old 20th September 2012, 21:55   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 20th September 2012, 21:56   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,777
http://nsis.sourceforge.net/External_License_file

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 20th September 2012, 22:02   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 21st September 2012, 00:41   #5
spkelly86
Junior Member
 
Join Date: Sep 2012
Posts: 18
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.
spkelly86 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump