Analyze text: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
No edit summary |
m (→The Script) |
||
Line 24: | Line 24: | ||
StrCmp $0 $1 End Loop | StrCmp $0 $1 End Loop | ||
End: | |||
MessageBox MB_OK "Game Over!" | MessageBox MB_OK "Game Over!" | ||
Revision as of 23:58, 1 November 2006
Author: Jan (talk, contrib) |
Description
This function analyzes an input text word-by-word. I wrote this as I needed to get file-extensions out of a list of space-seperated extensions (e.g. exe txt bmp jpg)
The Script
OutFile "AnalyzeWords.exe" ;Includes !include "WordFunc.nsh" !insertmacro WordFind !insertmacro WordFind2X ;Section Section ReadIniStr $0 "exe txt bmp jpg end" ;input Loop: ${WordFind} $0 " " "+1" $1 MessageBox MB_OK "'$1'" ;replace with your function ${WordFind2X} $0 $1 " " "-1}}" $0 StrCmp $0 $1 End Loop End: MessageBox MB_OK "Game Over!" SectionEnd