nsDialogs Listbox - get selected item index
NSD_LB_GetSelection lets me get the selected item text. How can I instead get the selected item index (0 or 1 base doesn't matter). Thanks!
3 posts
!include nsDialogs.nsh
!ifndef NSD_LB_GetSelectionIndex
!define NSD_LB_GetSelectionIndex `!insertmacro __NSD_LB_GetSelectionIndex `
!macro __NSD_LB_GetSelectionIndex CONTROL VAR
SendMessage ${CONTROL} ${LB_GETCURSEL} 0 0 ${VAR}
!macroend
!endif I think this has already been added to nsDialogs.nsh in NSIS v3 but I don't remember when nor if it is documented.