回复 1# zhenglei
使用下列代碼....將檔案 轉成 AU3#include<array.au3>
Func _FileToAu3($sSoure, $sDest)
$n = 0
$sfile = FileOpen($sSoure, 16)
$sbin = String(FileRead($sfile))
Dim $sarray[1]
While 1
If StringLen($sbin) - 4082 * $n < 0 Then ExitLoop
If $n = 0 Then
$sarray[0] = StringMid($sbin, 1, 4082)
Else
_ArrayAdd($sarray, StringMid($sbin, 4082 * $n + 1, 4082))
EndIf
$n = $n + 1
WEnd
$sDFile = FileOpen($sDest, 2)
FileWrite($sDFile, 'Func _Au3ToFile()' & @CRLF)
FileWrite($sDFile, "local $bin" & @CRLF)
For $x = 0 To UBound($sarray) - 1
FileWrite($sDFile, "$bin &='" & $sarray[$x] & "'" & @CRLF)
Next
FileWrite($sDFile, ' Return Binary($bin)' & @CRLF)
FileWrite($sDFile, 'EndFunc' & @CRLF)
EndFunc ;==>_FileToAu3
然後再將 轉成的AU3 寫成 UDF 加入到你的程式中......然後呼叫 讀取寫入到 妳要的位置 |