Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   ? Dyamically changing text with/without custom fields ? (http://forums.winamp.com/showthread.php?t=206054)

JimInNH 26th January 2005 21:07

? Dyamically changing text with/without custom fields ?
 
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.

Joel 26th January 2005 22:28

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 :D :igor:

pospec 14th November 2007 11:17

My goal was to rewrite text from one textbox to second textbox dynamically. I used System::Call user32::SetWindowText. I am using nsDialogs.

PHP Code:

!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_CreateText0 35 10012u "type here"
  
Pop $EDIT1
  GetFunctionAddress 
$0 OnChange1
  nsDialogs
::OnChange /NOUNLOAD $EDIT1 $0

  
${NSD_CreateText0 70 10012u '...'
  
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 ;)


All times are GMT. The time now is 04:55.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.