Old 17th October 2005, 10:07   #1
safl
Junior Member
 
Join Date: Oct 2005
Posts: 13
SectionIsSelected in section?

Hello!

I'm trying to use SectionIsSelected from Sections.nsh, to write some config files when certain sections have been selected. I'm executing this code inside my first section:

${If} ${SectionIsSelected} ${SEC03}
WriteIniStr DIR GROUP KEY VALUE
WriteIniStr DIR GROUP KEY VALUE2
WriteIniStr DIR GROUP KEY VALUE3
${EndIf}

When i compile i get the warning:
"warning: unknown variable/constant "{SEC03}" detected, ignoring (macro:_SectionFlagIsSet:2)

How can i fix this? I've tried using the .selChange or what's it's name. but problem is that the config file i want to write to haven't been installed at this point.

Regards,
Simon
safl is offline   Reply With Quote
Old 17th October 2005, 12:18   #2
glory_man
Senior Member
 
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
First you need to declare SEC03 constant. So use
code:
Section "Name" SEC03
. After that use it.
glory_man is offline   Reply With Quote
Old 17th October 2005, 13:40   #3
safl
Junior Member
 
Join Date: Oct 2005
Posts: 13
Too bad. This means i can't do this when my section is declared before the section i wan't to check.
safl is offline   Reply With Quote
Old 17th October 2005, 17:03   #4
NHOCSUNG
Guest
 
Posts: n/a
You can use Section Index to set flag, If i'm wrong 2 indicate to this section, so

${If} ${SectionIsSelected} 2
WriteIniStr DIR GROUP KEY VALUE
WriteIniStr DIR GROUP KEY VALUE2
WriteIniStr DIR GROUP KEY VALUE3
${EndIf}

there is no need to Name Sections
  Reply With Quote
Old 17th October 2005, 17:05   #5
NHOCSUNG
Guest
 
Posts: n/a
This mean you can set Section Description with Numbers
  Reply With Quote
Old 17th October 2005, 20:15   #6
safl
Junior Member
 
Join Date: Oct 2005
Posts: 13
Ok, got it working.
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