Archive: How can I make this page


How can I make this page
Hy I've make an custom page with an password


[Settings]
NumFields=1

[Field 1]
Type=Password
Left=12
Right=135
Top=6
Bottom=20


This password must redo an the word password I.

For this I use
http://nsis.sourceforge.net/wiki/ReplaceInFile

But where must I put in the !insertmacro

how can I do it?

Put it in the custom page's Leave function:

Page Custom ShowFunc LeaveFunc

Function LeaveFunc
...
FunctionEnd

-Stu


Hi I think that I haven't write very good what I want:

The Field 1

is a password field. So in the Function LeaveFunc I must write anything:

Perhaps

Function LeaveFunc


ReadIniStr $0 '$PLUGINSDIR\netsettings.ini' 'Field 1' 'State'

StrCmp $R0 (this should be the text in the password field) "1" 0 +2
!insertmacro ReplaceInFile "Password.txt" (Source file) "Password 1" (Search) "$R0" (replace with)

end

MessageBox MB_OK "Pls write an password"



I know that this is wrong but so it should be
THX


The value won't be 1, but what the user has entered in the password box (the actual password).

Also, you can't jump over the !insertmacro ReplaceInFile with a relative +2 jump because the macro contains more than one like of code. You need to jump over it with a label.

-Stu


Hi
I'm not very good with nsis


Could you write me the code
that it works ?

Thank you