Old 17th October 2005, 20:27   #1
safl
Junior Member
 
Join Date: Oct 2005
Posts: 13
MUI_INSTALLOPTIONS_READ, never gets user value

Hello,

I thank you all for youre quick replies and patient answers to my questions. Here is another one.

I've got 2 custom pages using installoptions.
Problem is that i never get the value the user entered, instead i get the value which is stored as default in my io ini-file.

I'm calling: !insertmacro MUI_INSTALLOPTIONS_READ $hostname "hostname.ini" "Field 2" "Text"

From a section. Hostname is declared at the begining of the script. I have reservefiles for the ini's.

The custom pages are displayed correctly, but the value returned from "!insertmacro ...READ" is not the one the user inputs it's the value which is in the .ini file as default.

How can this be? What am i missing?

Regards,
Simon
safl is offline   Reply With Quote
Old 17th October 2005, 20:33   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You probably want to read State and not Text. Take a look at the InstallOptions readme.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th October 2005, 08:18   #3
safl
Junior Member
 
Join Date: Oct 2005
Posts: 13
Exactly what i wanted.
Am i not reading carefully enough when i can't find anything about manipulating the submitted input? I wan't to remove the last "\" from DirRequests.
safl is offline   Reply With Quote
Old 18th October 2005, 12:02   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Use StrCpy. This example was taken from the documentation:
code:
StrCpy $0 "a string" -1 # = "a strin"

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 20th October 2005, 09:11   #5
safl
Junior Member
 
Join Date: Oct 2005
Posts: 13
Once again i thank you!
I ended up doing this:

StrCpy $1 $uncPath 1 -1
StrCmp $1 "\" 0 +2
StrCpy $uncPath $uncPath -1

It only removes the last if the last char is "\"
safl is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump