Skip to content
⌘ NSIS Forum Archive

Determine did var contains with some text!

5 posts

Vankov#

Determine did var contains with some text!

How to determine for sample did contains var result with text "MSG"?
jpderuiter#
You can use the WordFind macro from the WordFunc Header (NSIS user manual E.3)
${WordFind} "$sample" "MSG" "#" $R0
${If} $R0 > 0
DetailPrint '"MSG" found in string $sample ($R0 times)'
${Else}
DetailPrint '"MSG" not found in string $sample'
${EndIf}
You can use WordFindS to search case sensitive if needed.