Old 22nd April 2006, 07:44   #1
WhitedragonBC
Junior Member
 
Join Date: Apr 2006
Posts: 1
Prompting for a directory

I have 2 different sections on the components page, if the user has section 2 selected i need to prompt them to enter a directory, but not if they only have section 1 selected.
I know how to use page directory and installoptions to prompt for a directory, but how do i make them only appear if the user has section 2 selected? Using "InstallOptions::dialog "$PLUGINSDIR\FDSDir.ini"" in the section does bring up the dialog, but all the buttons are greyed out and you cant do anything.
I searched and couldnt find the answer to this on the forums or the wiki.
WhitedragonBC is offline   Reply With Quote
Old 22nd April 2006, 09:18   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
code:
!include Sections.nsh

!insertmacro MUI_PAGE_DIRECTORY

!define MUI_PAGE_CUSTOMFUNCTION_PRE Directory2Pre
!insertmacro MUI_PAGE_DIRECTORY

Section "Section 2" Sec2

SectionEnd

Function Directory2Pre
SectionGetFlags ${Sec2} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
StrCmp $R0 ${SF_SELECTED} +2
Abort
FunctionEnd



-Stu
Afrow UK 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