AutoIt
AutoIt
Load Entire File into BinData
Demonstrates how to load an entire file into a BinData object.Chilkat AutoIt Downloads
Local $bSuccess = False
$oFac = ObjCreate("Chilkat.FileAccess")
$bSuccess = $oFac.OpenForRead("qa_data/pdf/sample.pdf")
If ($bSuccess = False) Then
ConsoleWrite($oFac.LastErrorText & @CRLF)
Exit
EndIf
$oBd = ObjCreate("Chilkat.BinData")
Local $iMaxBytesToRead = 99999999
$bSuccess = $oFac.FileReadBd($iMaxBytesToRead,$oBd)
If ($bSuccess = False) Then
ConsoleWrite($oFac.LastErrorText & @CRLF)
Exit
EndIf
$oFac.FileClose
; The bd object contains the file data...
$bSuccess = $oBd.WriteFile("qa_output/sample.pdf")