daserraf Posted September 14, 2007 Share Posted September 14, 2007 hey guys, here is the code i use to print a html file If FileExists($p_file) Then RunWait(@COMSPEC&' /c rundll32.exe ' & @SystemDir & '\mshtml.dll,PrintHTML "' & @TempDir&"\PickingSlip.html" & '"',@TempDir,@SW_HIDE) WinWaitActive("Print","&Print") Send("!p") The problem I have it that I want to suppress the printer box from popping up. So it must jut send the job to the default printer Thanx for the help! Link to comment Share on other sites More sharing options...
daserraf Posted September 14, 2007 Author Share Posted September 14, 2007 hey guys,here is the code i use to print a html fileIf FileExists($p_file) Then RunWait(@COMSPEC&' /c rundll32.exe ' & @SystemDir & '\mshtml.dll,PrintHTML "' & @TempDir&"\PickingSlip.html" & '"',@TempDir,@SW_HIDE)WinWaitActive("Print","&Print")Send("!p")The problem I have it that I want to suppress the printer box from popping up. So it must jut send the job to the default printerThanx for the help! Or fo you guys have another way of printing a html file i have tried $file = @TempDir & "\PickingSlip.html"FileWriteLine($file,"<b>Bold text</b>")$oIE = _IECreate ($file,0,0)_IEAction ($oIE, "printdefault")_;IEQuit ($oIE)but have had no luck there either it doesnot even want to print Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 14, 2007 Share Posted September 14, 2007 Or you can just try it the simple way, rite from the help file: #include <File.au3> _FilePrint ( $s_File [, $i_Show] ) Link to comment Share on other sites More sharing options...
piccaso Posted September 14, 2007 Share Posted September 14, 2007 instead of RunWait, use Run.It wont block and you can handle the 'printer box' in AutoIt... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
daserraf Posted September 14, 2007 Author Share Posted September 14, 2007 instead of RunWait, use Run.It wont block and you can handle the 'printer box' in AutoIt...Thanx Piccaso worked perfectly! 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