Skip to content
⌘ NSIS Forum Archive

LineRead gives only one char

4 posts

fumb#

LineRead gives only one char

${LineRead} "$SYSDIR\GroupPolicy\User\Scripts\scripts.ini" "$R2" $R3

MessageBox MB_OKCANCEL|MB_ICONINFORMATION '$R3'
Why does this show $R3 as one char and not a whole line?
Instructor#
By your example it is difficult to say something. Attach "scripts.ini" and specify line number which gives wrong result.
fumb#
Originally posted by Instructor
By your example it is difficult to say something. Attach "scripts.ini" and specify line number which gives wrong result.
All line numbers gives the wrong result, I loop like this:
  StrCpy $R2 1
loop2:
${LineRead} "$SYSDIR\GroupPolicy\User\Scripts\scripts.ini" "$R2" $R3

MessageBox MB_OKCANCEL|MB_ICONINFORMATION '$R3'

IntOp $R2 $R2 + 1
Goto loop2
Instructor#
Function works fine. LineRead gives only one char becauce attached file is in UNICODE. You can convert this file to ANSI with this plugin and then read it.