How to recall script variables

It seems you're using an AdBlocker or JavaScript is disabled!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).

This 10 seconds wait is to let you update your AdBlocker whitelist...

Got it, show me the content...
Please enable JavaScript!
Anonymous user
How to recall script variables

Sorry for the trivial question but I'm trying to make a NSIS script for the first time. My problem is the way in which I can recall the variables of the generated dialog in main NSIS script (eg in a textbox I have a value how can I use this value in the nsi script?)

Sorry for the very trivial question

Thanks, Giulio

Posts: 1544
Joined: March 25, 2012 - 01:19
Set/Get control text

http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html#mref-gettext

Suppose you added a TextBox to a dialog, the generated script is this:

; === TextBox1 (type: Text) ===
${NSD_CreateText} 8u 69u 66u 11u "foo"
Pop $hCtl_Form1_TextBox1

To read/set the value into your variable:

Var myVar
${NSD_GetText} $hCtl_Form1_TextBox1 $myVar
${NSD_SetText} $hCtl_Form1_TextBox1 "bar"

Official nsDialog reference page: http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html