|
|
#1 |
|
Junior Member
Join Date: Jun 2002
Posts: 25
|
Call Function only if two sections selected
What's the most efficient way to call a function only if two sections have been selected by the user, using SectionGetFlags? Sorry if this is a dumb question, I just figured there was some way to do it quickly with an IntOp & operation.
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Jun 2002
Posts: 25
|
Ooops, actually meant if one OR the other is selected. What I am trying to do is check the selections from the user. They can install documentation only if one or another part of an SDK was selected. Will this work?:
PHP Code:
|
|
|
|
|
|
#3 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,336
|
This should do it:
PHP Code:
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jun 2002
Posts: 25
|
Also tried
PHP Code:
|
|
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,336
|
From where are you trying to call this code? I would suggest you call it from .onSelChange, and uncheck the docs section if non of the two SDK sections are selected.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jun 2002
Posts: 25
|
OK, the last bit of code works. Another section was calling that function.
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jun 2002
Posts: 25
|
Absolutely correct. I decided to pull this function. In the future, I will readdress it by using OnSelectChange, so that the user is aware of what's going on.
As a side note, I didn't realize that StrCmp worked for these comparisons. I was only using IntCmp. I will keep that in mind for the future. Thanks! |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|