I am looking for a way to show text within a single NSIS dialog that changes over time. E.g. "Starting...", "Now doing X", "Now doing Y", etc.
I've been trying with InstallOptions but the place where I would execute the loop getting the text to display does not execute until the user clicks on Next.
I tried handling in a leave page but that doesn't seem to work either.
Can this be done with NSIS? I don't see anything like it in examples or how to's or even as a previous question in the list for the last month.
? Dyamically changing text with/without custom fields ?
3 posts
Can..but you need HWND of the control, use the WM_SETTEXT nor SetWindowText (system plugin), also Sleep 😉... but the rest of the installation proc. can be delay also... you might wanna try making a plugin and subclassing the dialog nor hooking 😁 🧟
My goal was to rewrite text from one textbox to second textbox dynamically. I used System::Call user32::SetWindowText. I am using nsDialogs.
!include nsDialogs.nsh
Name "nsDialogs MyExample"
OutFile "nsDialogs MyExample.exe"
Page custom nsDialogsPage
Var EDIT1
Var EDIT2
Function nsDialogsPage
nsDialogs::Create /NOUNLOAD 1018
Pop $0
${NSD_CreateText} 0 35 100% 12u "type here"
Pop $EDIT1
GetFunctionAddress $0 OnChange1
nsDialogs::OnChange /NOUNLOAD $EDIT1 $0
${NSD_CreateText} 0 70 100% 12u '...'
Pop $EDIT2
nsDialogs::Show
FunctionEnd
Function OnChange1
System::Call user32::GetWindowText(i$EDIT1,t.r0,i${NSIS_MAX_STRLEN})
System::Call user32::SetWindowText(i$EDIT2,tr0)
FunctionEnd
Section
SectionEnd I hope that it work's 100% OK 😉