ファイル 1.txt を、次のコードを記述した R1 の行を除いて、元の内容に置き換えたいと考えています。
FileOpen $0 "1.txt" "r"
GetTempFileName $R0
FileOpen $1 $R0 "w"
loop:
FileRead $0 $2
IfErrors done
strcmp $R1 $2 loop here
here:
FileWrite $1 $2
Goto loop
done:
FileClose $0
FileClose $1
Delete "1.txt"
CopyFiles /SILENT $R0 "1.txt"
Delete $R0
しかし、うまく動作せず、1.txt をそのまま保持します。誰かが問題の場所を見つけるのを手伝ってくれませんか?