Prev Previous Post   Next Post Next
Old 16th July 2008, 22:43   #1
repuust
Junior Member
 
Join Date: Jul 2008
Posts: 5
Thumbs down Not equal comparison with strings

When using the LogicLib.nsh, is it just me, or can you not do "not equal" with two strings? I've tried to do something like:

${If} $DB_PWD <> $0
MessageBox MB_ICONEXCLAMATION|MB_OK "The two passwords do not match"
Abort
${EndIf}


or something similar a few times. It will never run the inner block of code, regardless of whether $DB_PWD and $0 are equal or not. I've now got these scatterered throughout my code:

${If} $DB_PWD == $0
; This is hack, because for some reason you can't do <> comparison with strings
${Else}
MessageBox MB_ICONEXCLAMATION|MB_OK "The two passwords do not match"
Abort
${EndIf}


I can't believe I'm the first to find this, but I can't find any post or help on something like this. The LogicLib.nsi sample compares integers, but not strings. Note, it works just fine with integers.
repuust is offline   Reply With Quote
 
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