Druckt eine reine Text-Datei
#include <File.au3>
_FilePrint ( $sFilePath [, $iShow = @SW_HIDE] )
$sFilePath | Die zu druckende Datei. |
$iShow | [optional] Der Fensterzustand. (Standard = @SW_HIDE) |
Erfolg: | 1 |
Fehler: | 0 und setzt das @error Flag auf ungleich null. |
Benutzt die ShellExecute Funktion von shell32.dll.
#include <File.au3>
#include <MsgBoxConstants.au3>
Local $sFilePath = FileOpenDialog("zu druckende Datei ", " ", "Textdokumente (*.txt) ", $FD_FILEMUSTEXIST)
If @error Then Exit
Local $print = _FilePrint($sFilePath)
If $print Then
MsgBox($MB_SYSTEMMODAL, "Drucken ", "Die Datei wurde gedruckt. ")
Else
MsgBox($MB_SYSTEMMODAL, "Drucken ", "Fehler: " & @error & @CRLF & "Die Datei wurde nicht gedruckt. ")
EndIf