Old 5th May 2007, 22:16   #1
Maxim30
Member
 
Maxim30's Avatar
 
Join Date: Sep 2005
Location: Martinsicuro -Teramo- Italy
Posts: 76
Question Defaul value for DropList

Hello,

I have a custom page with more 'DropList's; the "ListItems" string for eachone is "None|0|1|2|3". Prior I read from the registry their possible DWord values if present and I would show them in the droplist (as default current value). I have used the following not working code:

!insertmacro mui_installoptions_write ... "ListItems" "None|0|1|2|3"

ReadRegDWORD $0 HKLM ...

!insertmacro mui_installoptions_write ... "state" $0

When showing the custom page, in the droplist a white bar appears in place of the variable $0 instead of the right value (a number from 1 to 3):

can you give me the right code ?

Massimo
Maxim30 is offline   Reply With Quote
Old 6th May 2007, 16:29   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
The value of state needs to be correctly referred in ListItems.
In your case must be either none or 1 or 2 or 3.
I'd suggest debug your script with a massagebox to verify what actually $0 carries out.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 6th May 2007, 16:32   #3
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
STATE should set the value of the droplist, so your code should be working. But, you may need to make sure that (1) you are inserting the code in the right place and (2) that $0 is actually getting a valid value.

(And I assume that you are getting the right file/field name in your MUI_INSTALLOPTIONS_WRITE statement?)

PS: Looks like RedWine has beat me to it as usual!
Comperio is offline   Reply With Quote
Old 6th May 2007, 21:42   #4
Maxim30
Member
 
Maxim30's Avatar
 
Join Date: Sep 2005
Location: Martinsicuro -Teramo- Italy
Posts: 76
I have found: in effect I had mistyped the $0 variable by $1, now it works!

Massimo
Maxim30 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