读取文本内容
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>
#include <String.au3>
; Open the file for reading and store the handle to a variable.
Local $hFileOpen = FileOpen("log.txt")
If $hFileOpen = -1 Then
MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading the file.")
Return False
EndIf
; Read the contents of the file using the handle returned by FileOpen.
Local $sFileRead = FileRead($hFileOpen)
; Close the handle returned by FileOpen.
FileClose($hFileOpen)
; Display the contents of the file.
; MsgBox($MB_SYSTEMMODAL, "", $sFileRead)

浙公网安备 33010602011771号