View Single Post
Old 15th January 2018, 15:10   #1
Lord Cris
Junior Member
Join Date: Dec 2017
Posts: 9
Fileread problem

For now i have an explicit problem.

In my main script i call this function at descriptionInit


Function ReadAllDesc
Var /global j
${foreach} $j 0 $secCount + 1
SectionGetText $h $4
${StrContains} $5 "++" $4
${ifnot} $5 == ""
StrCpy $5 $4 "" 2
StrCpy $5 $4
!insertmacro DESC_READ $4 $lang $5

the macro has followed code in it:


!macro DESC_READ addonText lang addonVar
FileOpen $6 "$TEMP\addonInstallerPreFolder\5.1\${addonText}_${lang}.txt" r
FileRead $6 $${addonVar}
FileClose $6

my problem is now, that when i insert instat of $4 and $5 the explicit Names i can compile my script but when i want to use $5/$4 i got an error in my FileRead line

"Usage: FileRead $(user_var: handle input) $(user_var: text output) [maxlen]"

can anyone help me with that? Do i hae a logical problem or do it didnt work.

~ Cris
Lord Cris is offline   Reply With Quote