cppman Posted February 8, 2006 Posted February 8, 2006 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. Miva OS Project
Valuater Posted February 8, 2006 Posted February 8, 2006 (edited) 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 February 8, 2006 by Valuater
skippynz Posted February 8, 2006 Posted February 8, 2006 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
skippynz Posted February 8, 2006 Posted February 8, 2006 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
cppman Posted February 8, 2006 Author Posted February 8, 2006 yeah... i tried that earlier but it was'nt "Printing" for me. thanks, and sry to take ur time.great minds think alike - hahaha Miva OS Project
Rick Posted April 23, 2006 Posted April 23, 2006 (edited) is it possible to print an .rft or .doc file to default printer??? Edited April 23, 2006 by Rick Who needs puzzles when we have AutoIt!!
skippynz Posted April 26, 2006 Posted April 26, 2006 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now