Wordfind is not working properly
hello Friends,
Wordfind is not working properly for me.
I have a big text file I would like to read one word in the text file. While finding application is not giving proper results.
Code
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
;--------------------------------
;General
Outfile test.exe
;--------------------------------
;Pages
!insertmacro MUI_PAGE_INSTFILES
;--------------------------------
;including files
!include TextFunc.nsh
!insertmacro LineFind
!include WordFunc.nsh
!insertmacro WordReplace
!insertmacro WordFind
Function "MyFunction"
; $R9 current line
; $R8 current line number
; $R7 current line negative number
; $R6 current range of lines
; $R5 handle of a file opened to read
; $R4 handle of a file opened to write ($R4="" if "/NUL")
; you can use any string functions
; $R0-$R3 are not used (save data in them).
; ...
; var R0 "C:\Windows\Installer"
${WordFind} "$R9" " " "1" "$R0" ; get the First word
MessageBox MB_ICONQUESTION|MB_YESNO "$R0"
Push $0 ; If $var="StopLineFind" Then exit from function
; If $var="SkipWrite" Then skip current line (ignored if "/NUL")
FunctionEnd
Section "secDummy"
${LineFind} "test5.txt" "" "12" "MyFunction" ;12 = line number
SectionEnd
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
---------------My Text file sample
MSI (s) (04:54) [15:50:28:750]: Package we're running from ==> C:\WINDOWS\Installer\16a9af71.msi
MSI (s) (04:54) [15:50:28:750]: Package we're running from ==> C:\WINDOWS\Installer\16a9af72.msi
MSI (s) (04:54) [15:50:28:750]: Package we're running from ==> C:\WINDOWS\Installer\16a9af73.msi
MSI (s) (04:54) [15:50:28:750]: Package we're running from ==> C:\WINDOWS\Installer\16a9af74.msi
MSI (s) (04:54) [15:50:28:750]: Package we're running from ==> C:\WINDOWS\Installer\16a9af75.msi
MSI (s) (04:54) [15:50:28:750]: Package we're running from ==> C:\WINDOWS\Installer\16a9af76.msi
MSI (s) (04:54) [15:50:28:750]: Package we're running from ==> C:\WINDOWS\Installer\16a9af77.msi
v8
v9
=================================================
here it should display the result as "MSI", but it is displaying the result like below
MSI (s) (04:54) [15:50:28:750]: Package we're running from ==> C:\WINDOWS\Installer\16a9af71.msi
On a sample text file it is working fine, on big text file it is not giving the correct result also, it is just displaying some junk characters.
Any thing missing in my code. Please do the needfull.