Jump to content

Automate print dialog box?


Klexen
 Share

Recommended Posts

I'm using _IEaction($oiE, "print") to bring up dialog box... But it seems like the "controlclick" doesn't work on this print dialog box.

Basically, I just want to be able to print a webpage using default printer, without any dialog boxes, if possible.

Any suggestions?

Okay, I can print using the Print UDF. However, this does not seem to allow me to print webpages or files? Is there an easy way to automate printing webpages?

Edited by Klexen
Link to comment
Share on other sites

I'm using _IEaction($oiE, "print") to bring up dialog box... But it seems like the "controlclick" doesn't work on this print dialog box.

Basically, I just want to be able to print a webpage using default printer, without any dialog boxes, if possible.

Any suggestions?

Okay, I can print using the Print UDF. However, this does not seem to allow me to print webpages or files? Is there an easy way to automate printing webpages?

The simplest way I have seen is the method by james3mg here. See post #12 for what he had to say about it.

This is his function

Func _PrintHTML($p_file);my own print function
    If FileExists($p_file) Then RunWait(@COMSPEC&' /c rundll32.exe ' & @SystemDir & '\mshtml.dll,PrintHTML "' & $p_file & '"',@TempDir,@SW_HIDE)
EndFunc

So you can print a web page in just 2 lines

InetGet(...
_PrintHTML(..
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...