打印一个纯文本文件.
#Include <File.au3>
_FilePrint($s_File [, $i_Show = @SW_HIDE])
$s_File | 要打印的文件. |
$i_Show | [可选参数] 窗口状态. (default = @SW_HIDE) |
成功: | 返回 1. |
失败: | 返回 0 并按照全局常量列表设置 @error. |
#include <File.au3>
Local $file = FileOpenDialog("Print File", "", "Text Documents (*.txt)", 1)
If @error Then Exit
Local $print = _FilePrint($file)
If $print Then
MsgBox(4096, "Print", "The file was printed.")
Else
MsgBox(4096, "Print", "Error: " & @error & @CRLF & "The file was not printed.")
EndIf