How to recall script variables

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: 1125
Joined: March 25, 2012 - 01:19
Set/Get control text

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:


Warning, JavaScript is disabled!

JavaScript is not available, maybe because you disabled it globally into your browser settings or you are using an addon like NoScript.

We do not have any dangerous JavaScript running here.
Please enable JavaScript; if you're using NoScript this image will help you adding CoolSoft to your whitelist.

Thanks for your comprehension and enjoy CoolSoft.