Jump to content
Sign in to follow this  
daserraf

Trying to suppress display bax

Recommended Posts

daserraf

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!

Share this post


Link to post
Share on other sites
daserraf

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!

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

Share this post


Link to post
Share on other sites
DjDeep00

Or you can just try it the simple way, rite from the help file:

#include <File.au3>
_FilePrint ( $s_File [, $i_Show] )

Share this post


Link to post
Share on other sites
daserraf

instead of RunWait, use Run.

It wont block and you can handle the 'printer box' in AutoIt...

Thanx Piccaso worked perfectly!

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.