|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2012
Posts: 7
|
NSD_CreateListBox - not able to get the selected item text
Hi there,
I am using "NSD_CreateListBox" to allow user to select a folder from the given list. After the user selects an item, I need to fetch the text for that item, but my code fails to do so. Also, i am using "custom page". Could anyone of you please help? Here's the code snippet:- code: I am able to get the list populated, but not able to get the selected string/text. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Just use ${NSD_GetText}.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2012
Posts: 7
|
hi,
I placed below code in the customPage leave function: ${NSD_GetText} $ListBox $0 MessageBox MB_OK "$0" I am sure it's done wrong way as it didn't worked... Any suggestions? thanks, Priyanka |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,841
|
If you want to get the selection from a listbox, you should get the selection, not the text...
http://forums.winamp.com/showthread.php?threadid=276367 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Apr 2012
Posts: 7
|
I need to get the text of the selected item, since that will be the folder name into which the installer will place some DLLs.
|
|
|
|
|
|
#6 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,841
|
The answer to that is already in the thread I linked.
http://forums.winamp.com/showthread....65#post2226265 |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Apr 2012
Posts: 7
|
hey, I have already tried whats there in the link you shared, before raising the question on the forum. It didn't work for me.
I used :- System::Call user32::SendMessage(i$MY_LIST_BOX,i${LB_GETTEXT},i$INDEX,t.$0) But it throws warning "unknown variable/constant "INDEX"" Please ignore my inefficiency, I am new to NSIS scripting... Please help!!.. |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,841
|
...It's just an example, you cannot just simply copypaste it and expect it to work in your installer. Of course $INDEX is a variable containing the index of the item that you want to get the text/name of.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|