Archive: compare strings


compare strings
  Hi
following problem:

in my setup i have to compare 2 strings... but i'd to make it like in other programming languages...

[like this:


strin2 then

>!insertmacro bla_bla_bla
>else
!insertmacro nz_nz_nz
>
]
is there any way to do this that way?

or is there any chance to do it like this...


strcmp string1 string2 !insertmacro bla !insertmacro nz 

>

4.9.4.19 StrCmp
str1 str2 jump_if_equal [jump_if_not_equal]

Compares (case insensitively) str1 to str2. If str1 and str2 are equal, Gotos jump_if_equal, otherwise Gotos jump_if_not_equal.
I.e.:

StrCmp "OH" "blablabla" 0 +10

another example:


macro macro_notequal

>!macroend
>!macro macro_equal
>!macroend

Section"dummy_section" dummy_index
StrCmp"$1" "$2" equal
>!insertmacro macro_notequal
Goto end
equal:
!insertmacro macro_equal
end:
>SectionEnd
>