WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > NSIS Logic Library
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
dselkirk
Senior Member

Registered: Aug 2002
From:

Exclamation NSIS Logic Library

Hey, Here is another library to simplify the creation of your installs. This is the result of the previous post entitled "Select Statements". Thanks to eccles I have been able to completely rewrite it with improved functionality and speed.

Here is a list of the available statements:

if..elseif..else..endif
ifthen..|..|
ifcmd..||..|
select..case..case2..case3..case4..case5..case_else..endselect
for..exitfor..next
foreach..exitfor..next
do..exitdo..loop
dountil..exitdo..loop
do..exitdo..loopuntil
while..exitwhile..endwhile

Have a look at the provided example.nsi for working examples of the library. Once I get some feed back on possible changes or improvements then I will post it in the archive.

Don

Attachment: logiclib.zip
This has been downloaded 784 time(s).

Quick Link | Report this post to a moderator | IP: Logged

dselkirk is offline Old Post 10-03-2003 02:34 PM
Click Here to See the Profile for dselkirk Click here to Send dselkirk a Private Message Click Here to Email dselkirk Find more posts by dselkirk Add dselkirk to your buddy list Edit/Delete Message Reply w/Quote
eccles
NSIS Dev

Registered: Sep 2001
From: Leicester, UK

Hey Don, check your private messages...!

Dave.

Quick Link | Report this post to a moderator | IP: Logged

eccles is offline Old Post 10-03-2003 06:37 PM
Click Here to See the Profile for eccles Click here to Send eccles a Private Message Visit eccles's homepage! Find more posts by eccles Add eccles to your buddy list Edit/Delete Message Reply w/Quote
dselkirk
Senior Member

Registered: Aug 2002
From:

Version 2.1 adds break and continue labels to repeat type statements. Useful for functions like MessageBox, here is an example:

code:
${do} MessageBox MB_YESNO "Stop loop?" IDYES ${_break} ID_NO ${_continue} ${loop}


Thanks to eccles for the idea.

Attachment: logiclib.zip
This has been downloaded 462 time(s).

Quick Link | Report this post to a moderator | IP: Logged

dselkirk is offline Old Post 10-05-2003 10:06 PM
Click Here to See the Profile for dselkirk Click here to Send dselkirk a Private Message Click Here to Email dselkirk Find more posts by dselkirk Add dselkirk to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Jerusalem, Israel

Damn, that's so cool!

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 10-07-2003 12:02 AM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
eccles
NSIS Dev

Registered: Sep 2001
From: Leicester, UK

Don, I've made a couple of changes for your perusal.


  • Simplified IfThen by utilising If and EndIf
  • Maybe something similar could be done with IfCmd but I've not investigated this yet
  • Simplified For by utilising ForEach
  • Fixed ForEach missing the final iteration
  • Fixed a couple of Break/Continue bugs

You've added some code to the If {ElseIf} [Else] EndIf code (ElseIf labels) that I don't understand - I'm not sure that they are needed?

Anyway, looking good! Should help newcommers to NSIS no end

--
Dave.

Attachment: logiclib.nsh
This has been downloaded 423 time(s).

Quick Link | Report this post to a moderator | IP: Logged

eccles is offline Old Post 10-07-2003 12:56 PM
Click Here to See the Profile for eccles Click here to Send eccles a Private Message Visit eccles's homepage! Find more posts by eccles Add eccles to your buddy list Edit/Delete Message Reply w/Quote
dselkirk
Senior Member

Registered: Aug 2002
From:

Good work on the consolidation and fixes. I especially love your solution for the operation comparison in the foreach statement. Very nice. What were the issues with the break and continue labels? For the if..then statments I had to add some extra lines to handle just an if..else..endif statements. When I had something like the foloowing:

code:
${if} 1 = 5 MessageBox MB_OK "test1" ${else} MessageBox MB_OK "test2" ${endif}

Both messages would appear. It wasn't moving to the end. Here it is again with the updated file header.

Attachment: logiclib.zip
This has been downloaded 522 time(s).

Quick Link | Report this post to a moderator | IP: Logged

dselkirk is offline Old Post 10-07-2003 01:55 PM
Click Here to See the Profile for dselkirk Click here to Send dselkirk a Private Message Click Here to Email dselkirk Find more posts by dselkirk Add dselkirk to your buddy list Edit/Delete Message Reply w/Quote
eccles
NSIS Dev

Registered: Sep 2001
From: Leicester, UK

quote:
Originally posted by dselkirk
I especially love your solution for the operation comparison in the foreach statement.

Heh, you have to jump through some hoops sometimes to get NSIS to do what you want, but it's not often impossible.
quote:
What were the issues with the break and continue labels?

Either For or ForEach was not setting them (I forget which) and a couple of places were pushing them instead of popping them (IIRC...).
quote:

code:
${if} 1 = 5 MessageBox MB_OK "test1" ${else} MessageBox MB_OK "test2" ${endif}

Both messages would appear.

Ah, OK fair enough.

--
Dave.

Quick Link | Report this post to a moderator | IP: Logged

eccles is offline Old Post 10-07-2003 03:04 PM
Click Here to See the Profile for eccles Click here to Send eccles a Private Message Visit eccles's homepage! Find more posts by eccles Add eccles to your buddy list Edit/Delete Message Reply w/Quote
fraefel
Junior Member

Registered: Mar 2003
From:

Thumbs up

Hi eccles & dselkirk!

You are amazing - very nice job done !
This is going to save quite some lines of script...

Quick Link | Report this post to a moderator | IP: Logged

fraefel is offline Old Post 10-07-2003 08:15 PM
Click Here to See the Profile for fraefel Click here to Send fraefel a Private Message Click Here to Email fraefel Find more posts by fraefel Add fraefel to your buddy list Edit/Delete Message Reply w/Quote
eccles
NSIS Dev

Registered: Sep 2001
From: Leicester, UK

NSIS LogicLib Version 2.3

  • Much reworking and refactoring of things to help reduce duplication, etc. E.g. all loop varieties now go through a common set of macros.
  • Added built-in support for the rest of NSIS's built-in conditional tests (Abort, Errors, FileExists, RebootFlag, Silent).
  • Added ability to use any NSIS conditional command in a normal If type statement (no longer restricted to the spe******ed IfCmd statement).
  • Optimised the code produced by If (fewer Goto's).
  • Added statement similar to If that works in reverse: "Unless" executes the code in the contained block if the condition is false. If, Unless, ElseIf, ElseUnless, EndIf and EndUnless can be used freely in any combination.
  • Fixed bug where using Continue in a Do..LoopUntil loop went to the top of the loop and not the loop condition.
  • Added DoWhile..Loop and Do..LoopWhile loop varieties (the existing While..EndWhile loop is still available and is identical to DoWhile..Loop).
  • Optimised the code produced by Select (fewer Goto's).
  • Renamed Case_Else to CaseElse (nothing else has an underscore so why should that one). The old name is still available too though (if you must).
  • CaseElse can also be called Default (for the C-minded).
More changes are in the pipeline and LogicLib should be included in the standard NSIS distribution by the next NSIS release.

Enjoy!

--
Dave.

Attachment: logiclib2.3.zip
This has been downloaded 389 time(s).

Quick Link | Report this post to a moderator | IP: Logged

eccles is offline Old Post 12-11-2003 12:18 AM
Click Here to See the Profile for eccles Click here to Send eccles a Private Message Visit eccles's homepage! Find more posts by eccles Add eccles to your buddy list Edit/Delete Message Reply w/Quote
eccles
NSIS Dev

Registered: Sep 2001
From: Leicester, UK

NSIS LogicLib Version 2.4

  • Added Switch..Case*/Default..EndSwitch: similar to Select but behaves just like the C version. I.e.:
    - Each Case is more like a label than a block so execution "falls through" unless you use Break.
    - CaseElse (or Default) does not have to be the final case.
    - Case*/Default can appear anywhere inside the Switch (e.g. inside an If inside the Switch).
    (With thanks to kichik for the idea and proof-of-concept model).
  • Added unsigned integer comparisons U<, U>=, U> and U<=.
  • Added 64-bit integer comparisons L=, L<>, L<, L>=, L> and L<= (these use System.dll).
  • Added case-sensitive string tests S== and S!= (these use System.dll).
  • Added string comparisons (not case sensitive) S<, S>=, S> and S<= (these use System.dll).
  • Added section flag tests (SectionIsSelected, etc.) (to use these your script must include sections.nsh).
All of the new features can be seen in action in the example script.

--
Dave.

Attachment: logiclib2.4.zip
This has been downloaded 568 time(s).

Quick Link | Report this post to a moderator | IP: Logged

eccles is offline Old Post 12-13-2003 04:53 PM
Click Here to See the Profile for eccles Click here to Send eccles a Private Message Visit eccles's homepage! Find more posts by eccles Add eccles to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Jerusalem, Israel

I love it!

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 12-13-2003 05:04 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
CodeSquid
Member

Registered: Dec 2001
From:

Thumbs up

Great stuff! Truly amazing! What dou you come up with next? A NSIS compiler written in NSIS?

There's only one thing which should be improved:
Get rid of the ${} around the commands.
For example by adding a DeclareCommand function to NSIS or something similar. DeclareCommand ${If} If would make the If command available which then works like any of the built-in commands.
Or another way: Add support for function parameters and get rid of call.

And last but not least: Implicit inclusion of LogicLib.nsh to every script

Keep up the good work!

Quick Link | Report this post to a moderator | IP: Logged

CodeSquid is offline Old Post 12-14-2003 11:28 AM
Click Here to See the Profile for CodeSquid Click here to Send CodeSquid a Private Message Find more posts by CodeSquid Add CodeSquid to your buddy list Edit/Delete Message Reply w/Quote
Joost Verburg
NSIS MUI Dev

Registered: Nov 2001
From:

These things will become possible when NSIS supports compiler plug-ins.

Quick Link | Report this post to a moderator | IP: Logged

Joost Verburg is offline Old Post 12-14-2003 01:14 PM
Click Here to See the Profile for Joost Verburg Click here to Send Joost Verburg a Private Message Find more posts by Joost Verburg Add Joost Verburg to your buddy list Edit/Delete Message Reply w/Quote
CodeSquid
Member

Registered: Dec 2001
From:

Compiler plugins? Whoah, any ETA?

Quick Link | Report this post to a moderator | IP: Logged

CodeSquid is offline Old Post 12-14-2003 01:54 PM
Click Here to See the Profile for CodeSquid Click here to Send CodeSquid a Private Message Find more posts by CodeSquid Add CodeSquid to your buddy list Edit/Delete Message Reply w/Quote
Joost Verburg
NSIS MUI Dev

Registered: Nov 2001
From:

NSIS 2.1

NSIS 2.0 has to be finished first.

Quick Link | Report this post to a moderator | IP: Logged

Joost Verburg is offline Old Post 12-14-2003 03:33 PM
Click Here to See the Profile for Joost Verburg Click here to Send Joost Verburg a Private Message Find more posts by Joost Verburg Add Joost Verburg to your buddy list Edit/Delete Message Reply w/Quote
eccles
NSIS Dev

Registered: Sep 2001
From: Leicester, UK

Thanks all for the thanks Thanks must also go out to Don (dselkirk) for planting the seed (and the code up to version 2.1 ).

LogicLib has now been added to CVS and is included in the nightly snapshots and forthcoming NSIS releases.

I am open to ideas for other improvements and logic tests to encapsulate (such as the section flag tests added in the latest version).

quote:
And last but not least: Implicit inclusion of LogicLib.nsh to every script
nsisconf.nsh

--
Dave.

Quick Link | Report this post to a moderator | IP: Logged

eccles is offline Old Post 12-14-2003 04:10 PM
Click Here to See the Profile for eccles Click here to Send eccles a Private Message Visit eccles's homepage! Find more posts by eccles Add eccles to your buddy list Edit/Delete Message Reply w/Quote
eccles
NSIS Dev

Registered: Sep 2001
From: Leicester, UK

New in CVS: LogicLib v2.5


  • AndIf, AndUnless, OrIf, OrUnless added. These can be placed after If, Unless, ElseIf and ElseUnless to add any number of extra conditions. Order of precedence is strictly left-to-right though (or rather, top to bottom).
  • Warnings of "unused variable _LOGICLIB_TEMP" are now avoided. When using the features that make use of this variable you will need to add a !define above !include LogicLib.nsh to let LogicLib know in advance. If you forget, a compiler error message will explain what is needed.

__________________
You can lead a man to knowledge, but you can't make him think!

Quick Link | Report this post to a moderator | IP: Logged

eccles is offline Old Post 08-23-2004 01:49 PM
Click Here to See the Profile for eccles Click here to Send eccles a Private Message Visit eccles's homepage! Find more posts by eccles Add eccles to your buddy list Edit/Delete Message Reply w/Quote
rsegal
Senior Member

Registered: Feb 2003
From: Toronto, Canada

eccles this logic library is amazing. I've converted some of my scripts to use it and have been able to eliminate huge chunks of script because of it. Thanks alot man!

__________________
Rob Segal - Software Developer
http://www.sarcasticcoder.com

Quick Link | Report this post to a moderator | IP: Logged

rsegal is offline Old Post 08-24-2004 02:54 AM
Click Here to See the Profile for rsegal Click here to Send rsegal a Private Message Click Here to Email rsegal Visit rsegal's homepage! Find more posts by rsegal Add rsegal to your buddy list Edit/Delete Message Reply w/Quote
Animaether
Major Dude

Registered: Jun 2001
From:

small question... can you not use LogicLib inside of macros with passed variables ?
e.g.

PHP:

!macro someMacro someVar
  
${If} ${someVar} == 0
    
# do something
  
${EndIf}
!
macroend


Tells me: !insertmacro: macro "_If" requires 4 parameter(s), passed 3!

Quick Link | Report this post to a moderator | IP: Logged

Animaether is offline Old Post 11-24-2005 01:33 AM
Click Here to See the Profile for Animaether Click here to Send Animaether a Private Message Find more posts by Animaether Add Animaether to your buddy list Edit/Delete Message Reply w/Quote
Animaether
Major Dude

Registered: Jun 2001
From:

nevermind... it's fine..

The problem is that I'm passing the macro an empty string:

PHP:

!insertmacro someMacro ""


And that throws the error. Apparently because once inside the macro, "" becomes <null>. Weird.

Work-arounds?
PHP:

!macro someMacro someVar
${If} "${someVar}" == "0"
  
# do something
${ElseIf} "${someVar}" == ""
  
# do something else
${EndIf}
!
macroend


That would kill any integer checks, though.

PHP:

!insertmacro someMacro "''"


Seems to work - is that the proper way to go about this ?

I'm a bit confused as to why an empty string becomes null if passed to a macro, though. In the latter bit, my string consisting of two quotation marks essentially becomes an empty string?

Quick Link | Report this post to a moderator | IP: Logged

Animaether is offline Old Post 11-24-2005 04:19 AM
Click Here to See the Profile for Animaether Click here to Send Animaether a Private Message Find more posts by Animaether Add Animaether to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Jerusalem, Israel

Quoting in the ${If} line is the correct way to get around this. Why would it kill any integer checks?

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 11-24-2005 01:24 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
Animaether
Major Dude

Registered: Jun 2001
From:

because I'm making the gross assumption that you can't compare a string to an int :x

Thanks for the pointer

Quick Link | Report this post to a moderator | IP: Logged

Animaether is offline Old Post 11-24-2005 03:55 PM
Click Here to See the Profile for Animaether Click here to Send Animaether a Private Message Find more posts by Animaether Add Animaether to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Jerusalem, Israel

But an integer is a string in NSIS. Commands that require integers automatically convert the string to an integer.

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 11-24-2005 04:00 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
mamilo
Junior Member

Registered: Nov 2006
From:

Hi,
i have a question how to use If in the new Logiclib.
${If} ${SectionIsSelected} ${CSEC}
!insertmacro UnSelectSection ${ESEC}
${EndIf}

i get an error: "macro "If" requires 3 parameter(s), passed 2!"
I don't understand

Quick Link | Report this post to a moderator | IP: Logged

mamilo is offline Old Post 11-29-2006 11:59 AM
Click Here to See the Profile for mamilo Click here to Send mamilo a Private Message Find more posts by mamilo Add mamilo to your buddy list Edit/Delete Message Reply w/Quote
bholliger
Senior Member

Registered: Jul 2004
From: Switzerland

Hi mamilo!

Did you write this code below the
Section Sec01 CSEC
declaration?

Cheers

Bruno

Quick Link | Report this post to a moderator | IP: Logged

bholliger is offline Old Post 11-29-2006 09:00 PM
Click Here to See the Profile for bholliger Click here to Send bholliger a Private Message Visit bholliger's homepage! Find more posts by bholliger Add bholliger to your buddy list Edit/Delete Message Reply w/Quote
Comperio
Major Dude

Registered: Jan 2005
From: Oregon Coast

Shouldn't it be this?

code:
${If} ${CSEC} = ${SectionIsSelected} !insertmacro UnSelectSection ${ESEC} ${EndIf}

Quick Link | Report this post to a moderator | IP: Logged

Comperio is offline Old Post 12-01-2006 03:28 PM
Click Here to See the Profile for Comperio Click here to Send Comperio a Private Message Find more posts by Comperio Add Comperio to your buddy list Edit/Delete Message Reply w/Quote
bholliger
Senior Member

Registered: Jul 2004
From: Switzerland

I think the code is correct.

http://nsis.sourceforge.net/LogicLib#Expressions

But I believe the define has not yet been created by the compiler and therefore the constant is empty. Put the code below the section declaration.

Quick Link | Report this post to a moderator | IP: Logged

bholliger is offline Old Post 12-01-2006 10:31 PM
Click Here to See the Profile for bholliger Click here to Send bholliger a Private Message Visit bholliger's homepage! Find more posts by bholliger Add bholliger to your buddy list Edit/Delete Message Reply w/Quote
phunkydizco
Junior Member

Registered: Jul 2005
From:

How do I use the OrUnless Statement correctly? I want to do something when one of two sections is selected. Here is my code that doesn't work:

code:
SectionGetFlags ${SEC02} $R0 Intop $R1 $R0 | 1 SectionGetFlags ${SEC03} $R2 Intop $R3 $R2 | 1 ${Unless} $R0 <> $R1 ${OrUnless} $R2 <> $R3 Do Something ${EndUnless}

Quick Link | Report this post to a moderator | IP: Logged

phunkydizco is offline Old Post 11-20-2008 02:40 PM
Click Here to See the Profile for phunkydizco Click here to Send phunkydizco a Private Message Find more posts by phunkydizco Add phunkydizco to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

only one "if" statement per line

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-20-2008 02:46 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
phunkydizco
Junior Member

Registered: Jul 2005
From:

Is this correct?

code:
SectionGetFlags ${SEC02} $R0 Intop $R1 $R0 | 1 SectionGetFlags ${SEC03} $R2 Intop $R3 $R2 | 1 ${Unless} $R0 <> $R1 ${OrUnless} $R2 <> $R3 Do Something ${EndUnless}

Quick Link | Report this post to a moderator | IP: Logged

phunkydizco is offline Old Post 11-20-2008 02:50 PM
Click Here to See the Profile for phunkydizco Click here to Send phunkydizco a Private Message Find more posts by phunkydizco Add phunkydizco to your buddy list Edit/Delete Message Reply w/Quote
Afrow UK
Moderator

Registered: Nov 2002
From: Shropshire, England

You can just use the ${If} ${SelectionIsSelected} ... ${OrIf} ${SelectionIsSelected} ...

Stu

__________________
afrowuk.co.uk

Quick Link | Report this post to a moderator | IP: Logged

Afrow UK is offline Old Post 11-20-2008 05:40 PM
Click Here to See the Profile for Afrow UK Click here to Send Afrow UK a Private Message Click Here to Email Afrow UK Visit Afrow UK's homepage! Find more posts by Afrow UK Add Afrow UK to your buddy list Edit/Delete Message Reply w/Quote
Animaether
Major Dude

Registered: Jun 2001
From:

besides what Afrow said - yes, that'd be correct
'd still go with what Afrow said, though

Quick Link | Report this post to a moderator | IP: Logged

Animaether is offline Old Post 11-20-2008 06:31 PM
Click Here to See the Profile for Animaether Click here to Send Animaether a Private Message Find more posts by Animaether Add Animaether to your buddy list Edit/Delete Message Reply w/Quote
phunkydizco
Junior Member

Registered: Jul 2005
From:

quote:
Originally posted by Afrow UK
You can just use the ${If} ${SelectionIsSelected} ... ${OrIf} ${SelectionIsSelected} ...

Stu



That is not a good idea. Because with your code I have to copy my "Do Something" code twice.

${Unless} $R0 <> $R1
${OrUnless} $R2 <> $R3
Do Something
${EndUnless}

This seems to work and is very short.

Quick Link | Report this post to a moderator | IP: Logged

phunkydizco is offline Old Post 11-20-2008 06:49 PM
Click Here to See the Profile for phunkydizco Click here to Send phunkydizco a Private Message Find more posts by phunkydizco Add phunkydizco to your buddy list Edit/Delete Message Reply w/Quote
Afrow UK
Moderator

Registered: Nov 2002
From: Shropshire, England

Why?

${If} ${SelectionIsSelected} ${SEC02}
${OrIf} ${SelectionIsSelected} ${SEC03}
...
${EndIf}

Stu

__________________
afrowuk.co.uk

Quick Link | Report this post to a moderator | IP: Logged

Afrow UK is offline Old Post 11-20-2008 07:01 PM
Click Here to See the Profile for Afrow UK Click here to Send Afrow UK a Private Message Click Here to Email Afrow UK Visit Afrow UK's homepage! Find more posts by Afrow UK Add Afrow UK to your buddy list Edit/Delete Message Reply w/Quote
phunkydizco
Junior Member

Registered: Jul 2005
From:

That's right I didn't see that. But my code is also ok?

Quick Link | Report this post to a moderator | IP: Logged

phunkydizco is offline Old Post 11-20-2008 07:47 PM
Click Here to See the Profile for phunkydizco Click here to Send phunkydizco a Private Message Find more posts by phunkydizco Add phunkydizco to your buddy list Edit/Delete Message Reply w/Quote
Afrow UK
Moderator

Registered: Nov 2002
From: Shropshire, England

It may work but the proper logic is to check if ${SF_SELECTED} (1) is set:

SectionGetFlags ${SEC02} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
${If} $R0 != 0
...

This is what ${If} ${SelectionIsSelected} ${SEC02} would be doing internally.

Stu

__________________
afrowuk.co.uk

Quick Link | Report this post to a moderator | IP: Logged

Afrow UK is offline Old Post 11-20-2008 11:42 PM
Click Here to See the Profile for Afrow UK Click here to Send Afrow UK a Private Message Click Here to Email Afrow UK Visit Afrow UK's homepage! Find more posts by Afrow UK Add Afrow UK to your buddy list Edit/Delete Message Reply w/Quote
phunkydizco
Junior Member

Registered: Jul 2005
From:

What does this line?

IntOp $R0 $R0 & ${SF_SELECTED}

Quick Link | Report this post to a moderator | IP: Logged

phunkydizco is offline Old Post 11-21-2008 07:49 AM
Click Here to See the Profile for phunkydizco Click here to Send phunkydizco a Private Message Find more posts by phunkydizco Add phunkydizco to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 04:49 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > NSIS Logic Library
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON