这是一个读取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
作者为
于 发表因不满浏览器调试php代码的速度,特写了一个简单的AHK调试html源码的小工具,建议下载时间不得超过1分钟。
gui, add, edit, x0 y0 w400 h20 vaddress, gui, add, button, x400 y0 w60 h20 vbm gbm, GB2312 gui, add, button, x460 y0 w40 h20 gok Default, 加载 gui, add, edit, x0 y20 w500 h200 vshow, gui, show, , URLDownload To File bm = GB2312 Return bm: if bm = GB2312 { bm = UTF-8 GuiControl, , bm, %bm% goto, ok } Else { bm = GB2312 GuiControl, , bm, %bm% goto, ok } ok: GuiControlGet, address if bm = GB2312 FileEncoding, if bm = UTF-8 FileEncoding, UTF-8 URLDownloadToFile, %address%, %A_Temp%\tp.tmp FileRead, a, %A_Temp%\tp.tmp ;StringReplace, a, a, `n, \n`n, All GuiControl, , show, %a%`n______________%A_Now%_____________ Return GuiClose: ExitApp
49 queries in 1.324 seconds |