Jnuw
6th January 2005 16:17 UTC
Print the contents of a MessageBox
Hello all. I wrote a little NSIS script that reports if a user is up-to-date or not, and at the end reports what updates they are missing. I would like to print the MessageBox or at least the contents of the MessageBox. Is there a way to do this? I would be alright with sending the contents of the MessageBox into a txt file, and printing that txt file, but not sure how to do that. Any help would be much appreciated, thanks.
Afrow UK
6th January 2005 21:29 UTC
This should help you:
http://www.agg.dkrz.de/people/Patzig/fprt/fprthlp.htm
-Stu
Afrow UK
6th January 2005 21:31 UTC
Ok, you don't really need that. I found this also, which doesn't require a seperate executable (just plain DOS command):
http://www.melbpc.org.au/pcupdate/2208/2208article4.htm
-Stu
kichik
6th January 2005 21:39 UTC
If you create a text file with the text, this should also work:
ExecShell print "C:\path\to\file.txt"
It might not work if the user has changed the default association for text files.
Jnuw
6th January 2005 22:15 UTC
Thanks guys, I’ll try them out.
Question though, what would be the best way to send text to a txt file from the nsis script? I would like to append, so I can add multiple lines, making a list. Thanks.
RobGrant
7th January 2005 08:54 UTC
Jnuw, look up FileOpen (in append mode), FileSeek (to get to the end of the file before you write), FileWrite and FileClose in the docs, those are the four commands you need.
Jnuw
7th January 2005 22:06 UTC
RobGrant - Excellent, thanks!