Old 2nd February 2011, 15:12   #1
bltomov
Junior Member
 
Join Date: Jul 2009
Posts: 10
Install button text

Hallo, in my NSIS script, i need to change sometimes the label of the "next >" button to "install", because the page is the last page.
I have found that using the
GetDlgItem $1 $HWNDPARENT 1
SendMessage $1 "${WM_SETTEXT}" "STR:text"
i can change the text of the next button. My question, is how can i get the default text of the install button?
Or have someone i idea, to change dynamically the number of pages?

Thank you!

Regards,
Boian
bltomov is offline   Reply With Quote
Old 2nd February 2011, 16:25   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,484
MessageBox mb_ok "$(^InstallBtn)"

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 16th July 2015, 15:57   #3
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
i must use from that code in where is my .nsi file?!
in function?
in Section?
is possible give me a example?
thanks
r2du-soft is offline   Reply With Quote
Old 16th July 2015, 18:29   #4
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by r2du-soft View Post
in function?
in Section?
You can do both.

Probably makes the most sense in the MUI_PAGE_CUSTOMFUNCTION_SHOW function of the respective page!

(Assuming you use MUI)

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 16th July 2015, 20:26   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,484
The best way is InstallButtonText: http://forums.winamp.com/showthread.php?t=294128

You can also override the langstring.

If you had multiple sets of pages (two or more instfiles pages) and you only wanted to change one of them you would use the getdlgitem code in the pages show callback...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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