Jump to content

Printers


cppman
 Share

Recommended Posts

Straight from help

#include <File.au3>

$file = FileOpenDialog("Print File", "", "Text Documents (*.txt)", 1)
If @error Then Exit

$print = _FilePrint($file)
If $print Then
    MsgBox(0, "Print", "The file was printed.")
Else
    MsgBox(0, "Print", "Error: " & @error & @CRLF & "The file was not printed.")
EndIf

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

hello people. im back. lol.

Is their any function to print text using the printer?

like actually print it out of the user's default printer?

i've been searching the help file, and all over the forum. can't find anything about it.

i appreciate your help.

its in the helpfile beta version

#include <File.au3>

$file = FileOpenDialog("Print File", "", "Text Documents (*.txt)", 1)
If @error Then Exit

$print = _FilePrint($file)
If $print Then
    MsgBox(0, "Print", "The file was printed.")
Else
    MsgBox(0, "Print", "Error: " & @error & @CRLF & "The file was not printed.")
EndIf
Link to comment
Share on other sites

Straight from help

#include <File.au3>

$file = FileOpenDialog("Print File", "", "Text Documents (*.txt)", 1)
If @error Then Exit

$print = _FilePrint($file)
If $print Then
    MsgBox(0, "Print", "The file was printed.")
Else
    MsgBox(0, "Print", "Error: " & @error & @CRLF & "The file was not printed.")
EndIf

8)

great minds think alike - hahaha

Link to comment
Share on other sites

  • 2 months later...

is it possible to print an .rft or .doc file to default printer???

yep just change the file open dialog to include the doc extn - see code below - you can also add in rtf files too - default app (ie word) opens up file and then prints the selected file then closes again.

#include <File.au3>

$file = FileOpenDialog("Print File", "", "Text Documents (*.txt)|Word Documents (*.doc)", 1)
If @error Then Exit

$print = _FilePrint($file)
If $print Then
    MsgBox(0, "Print", "The file was printed.")
Else
    MsgBox(0, "Print", "Error: " & @error & @CRLF & "The file was not printed.")
EndIf
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...