Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   ReadInstr is not working (http://forums.winamp.com/showthread.php?t=262532)

kulakshay 27th December 2006 03:57

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

Red Wine 27th December 2006 04:43

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

kulakshay 27th December 2006 04:51

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

plz help me

Red Wine 27th December 2006 05:02

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

kulakshay 27th December 2006 05:16

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...

Red Wine 27th December 2006 05:33

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

kulakshay 27th December 2006 07:29

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..?

Red Wine 27th December 2006 07:36

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.

kulakshay 27th December 2006 07:46

what is show and leave function are they any particular

Red Wine 27th December 2006 08:14

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.


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.