jvanegmond Posted July 14, 2006 Share Posted July 14, 2006 (edited) Just another way of printing. Func PrintFile($File,$PrintPort='LPT1') $File = StringReplace($File,"/", "\") If Not FileExists($File) Then Return 0 EndIf Run(@ComSpec & ' /c print /d:'&$PrintPort&' '&$File,'',@SW_HIDE) Return 1 EndFunc Edited July 14, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
{NL}--Xantios--- Posted July 15, 2006 Share Posted July 15, 2006 Sweet :-) i save this :-) you never know it might be handy (sorry i dont know how to write might) i think it wil be fun @ school.. using a while loop , uhm shit i did not say that ! Link to comment Share on other sites More sharing options...
jvanegmond Posted July 15, 2006 Author Share Posted July 15, 2006 In that case, have fun with my new PrintString function. Here's an example of how you might spam your school. For $x = 0 to 60 PrintString("AutoIt is the bomb. AutoIt is the bomb. AutoIt is the bomb. ") Next Func PrintString($String,$PrintPort='LPT1') RunWait(@ComSpec & ' /c ECHO '&$String&' > '&$PrintPort,'',@SW_HIDE) EndFunc github.com/jvanegmond Link to comment Share on other sites More sharing options...
ConsultingJoe Posted July 15, 2006 Share Posted July 15, 2006 How do you use this with a network printer and is there a way to find out how many and what printers there are? Thanks [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 15, 2006 Share Posted July 15, 2006 Try a printing API with DllCall. I'm thinking I may write a dll for printing without an external application. It's just another item on my list. Link to comment Share on other sites More sharing options...
Developers Jos Posted July 15, 2006 Developers Share Posted July 15, 2006 (edited) what about this version ? works when there is a Print option available for a file Extension: Func _FilePrintCom($iFile) If Not FileExists($iFile) Then Return SetError(1,0,0) $objShellApp = ObjCreate("Shell.Application") $objShellApp.ShellExecute($iFile,0,0,"PRINT",0) EndFunc Edited July 15, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ConsultingJoe Posted July 15, 2006 Share Posted July 15, 2006 what about this version ? works when there is a Print option available for a file Extension: Func _FilePrintCom($iFile) If Not FileExists($iFile) Then Return SetError(1,0,0) $objShellApp = ObjCreate("Shell.Application") $objShellApp.ShellExecute($iFile,0,0,"PRINT",0) EndFuncfor a picture it opened it with the windows picture viewer, for a TXT it printed to the default. thanks, but I wanted to be able find avalible printer??? [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Link to comment Share on other sites More sharing options...
Developers Jos Posted July 15, 2006 Developers Share Posted July 15, 2006 for a picture it opened it with the windows picture viewer, for a TXT it printed to the default.thanks, but I wanted to be able find avalible printer???This is indeed printing to the default priner...There are other COM functions to select any of your installed printers.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
AutoItKing Posted July 15, 2006 Share Posted July 15, 2006 What about _FilePrint in the file.au3 include? http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
jvanegmond Posted July 16, 2006 Author Share Posted July 16, 2006 (edited) What about _FilePrint in the file.au3 include?The first string i wrote in this topic was "Just another way of printing." what do you think i was referring to? I think this is faster though, but it has poor support.Edit: If you weren't replying to me, then i am ever so sorry and I offer you my sincere apologies. Edited July 16, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
jvanegmond Posted July 16, 2006 Author Share Posted July 16, 2006 (edited) How do you use this with a network printer and is there a way to find out how many and what printers there are?ThanksFor networks printers use the full path as parameter for printport:\\pcname\printer1\I have no idea how to figure what printers there are, this was just a quick thought and i wanted to write it down. Edited July 16, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
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