Archive: ReadInstr is not working


ReadINIStr is not working
I am trying to take input from user , have written code something like this...

It is not working properly it's generating an error... plz help me


Function UserSerialNumberDialog
!insertmacro MUI_HEADER_TEXT "$(NAMEPAGEHERE_TITLE)" "$(NAMEPAGEHERE_SUBTITLE)"
# Display the page.
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "UserSerialNumberDialog"
ClearErrors
ReadINIStr $R0 "test1.ini" "Field 2" "State"
IfErrors done
goto +3
done:
MessageBox MB_OK "Error"
FunctionEnd


ReadINIStr $R0 "$PLUGINSDIR\test1.ini" "Field 2" "State"
IfErrors 0 next
MessageBox MB_OK "Error"
Abort
next:


hi, thanks for that reply...
but still it is giving error...ie gng to error part of if...

plz help me


I don't get it. Is this your custom page show function, or leave function?


hi,
I am trying to take input from user through a .ini file ..
.ini file is a simple file having a 3 compnents like textbox, list etc.

I want to read those value in $R0 but can't do it..

but it always go to error part of if...


Download the test.nsi
from the following thread, compile it and exetute it. This would help you to understand how to get input from user.
http://forums.winamp.com/showthread....hreadid=262263


hi,
thanks for that file ..
it is realy a useful...
but still my code is not working..
neither readINIStr nor writeINIStr is working
where is the possibility of mistake..?


Compare the 2 files regarding on the show-leave functions to see where is the fault. You can't add code that captures user input at show function, you have to add it at leave function.


what is show and leave function are they any particular


show means show the custom page, leave means when user presses next button to go to the next page or presses a button that has NOTIFY flags, so before step to the next page you're able to capture the input.
They are all explained there plainly. Also check the included IstallOptions examples.