Jump to content

Printer...


Recommended Posts

Hi.. I would like to know if is possible print some file like a internet page, like this:

Printer("C:\TestFile.htm")

I would like to send the name of a exist file and print it.

Thanks for help

The best way to print an HTML file was found by james3mg IMO, and it might not be so easy to find it by searching. He used it in his Meal Planner in example scripts and other places.

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
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

The best way to print an HTML file was found by james3mg IMO, and it might not be so easy to find it by searching. He used it in his Meal Planner in example scripts and other places.

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

Hi..

I'm try but the printer does't print the file, the dialog printer open, i click in print but not print..

please help

Link to comment
Share on other sites

What error? my printer is not a local printer.. can be this? why not print?

I put a html file, the file exists and not print.. please somebody help me, what's wrong?

I don't know what the problem is. I've tried it on 2 different printers on a network and the first time I tried on one printer nothing happened. The next time it printed ok.

Try some different HTML files and if possible a different printer.

Make sure the files can be viewed in your browser.

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

I don't know what the problem is. I've tried it on 2 different printers on a network and the first time I tried on one printer nothing happened. The next time it printed ok.

Try some different HTML files and if possible a different printer.

Make sure the files can be viewed in your browser.

thanks for your attention.. I can print html files now!!! VERY VERY THANKS!!!

Do you know how print doc files in the same style? thanks again

Link to comment
Share on other sites

thanks for your attention.. I can print html files now!!! VERY VERY THANKS!!!

:D

Do you know how print doc files in the same style? thanks again

:D No I don't. Maybe you should have a look at big_daddy's Word UDF in example scripts

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...