这是一个读取ahk文件列表汇集到一个文件便于全文搜索的示例
FileRead, c, *P936 list.txt
Loop, Parse, c, `n, `r
{
file := FileOpen(A_LoopField,"r") ;读取文件头4字节
int := file.ReadUInt()
file.close()
if InStr(Format("{1:X}", int),"BFBBEF") ;包含UTF-8 BOM
FileRead, t, *P65001 %A_LoopField%
else
FileRead, t, *P936 %A_LoopField%
FileAppend, % ";" A_LoopField "`n`n" t "`n", ahk_combine.ahk
}
MsgBox OK
60 queries in 3.965 seconds |