bgosalci
6th December 2004 10:16 UTC
Help with StrCmp
Hi, I am Java programmer and new to NSIS I need help with StrCmp. I want to achieve the following:
($var1 != "") == ($var2 != "")
I did not see the way to use Java && (and) operator with StrCmp, is there a way to do the same in NSIS, and how would I compare two variables as shown above.
Thanks
RobGrant
6th December 2004 11:43 UTC
StrCmp $var1 "" varOneEmpty neitherVarEmpty
varOneEmpty:
StrCmp $var2 "" varTwoEmpty neitherVarEmpty
varTwoEmpty:
; Do stuff which can only be done if both are empty
Goto post
neitherVarEmpty:
; oops, at least one of them wasn't empty
post:
; stuff to do for either case
-rob-
bgosalci
6th December 2004 12:03 UTC
Thanks Rob that works.
Afrow UK
6th December 2004 12:24 UTC
There's also LogicLib which is great for those hardcore programmers like myself :)
See Examples\LogicLib.nsi
-Stu
RobGrant
6th December 2004 14:07 UTC
Oh yeah, I should look at that sometime, it looks ace.