Jump to content

Printing formatted pages from AutoIt?


 Share

Recommended Posts

:) I'm giving up...!

I cannot find a way to print formatted output from autoit, and still have no clue.

Is there a way to send formatted output (to say, bold, italics, underlined) from autoit?

Or I have to use a filter...? If it is the case, Which filter is lightweight and provide more printing options?

Rev 127 Et factum et prælium magnum in cælo: Michaël et angeli ejus præliabantur cum dracone, et draco pugnabat, et angeli ejus: 8 et non valuerant, neque locus inventus est eorum amplius in cælo.9 Et projectus est draco ille magnus, serpens antiquus, qui vocatur diabolus, et Satanas, qui seducit universum orbem: et projectus est in terram, et angeli ejus cum illo missi sunt.

Link to comment
Share on other sites

:) I'm giving up...!

I cannot find a way to print formatted output from autoit, and still have no clue.

Is there a way to send formatted output (to say, bold, italics, underlined) from autoit?

Or I have to use a filter...? If it is the case, Which filter is lightweight and provide more printing options?

automate wordpad with autoit or use the MS Word/Excel UDF if you have MS Office installed.

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

automate wordpad with autoit or use the MS Word/Excel UDF if you have MS Office installed.

Thanks for the advice, but... (there is always a but...)

I was thinking formatting "behind the scenes", not showing the user that I have automatted another part of his/hers OS... :) I have tried to do it via HTML (messy), PDF (more messy)... and a couple of options. HTML was fine but It will be better if I hide the browser and send it to the printer... (perhaps just showing the printing dialog to allow the user to regret from his action :D). And I cannot know if the end-users have MS-Office

Rev 127 Et factum et prælium magnum in cælo: Michaël et angeli ejus præliabantur cum dracone, et draco pugnabat, et angeli ejus: 8 et non valuerant, neque locus inventus est eorum amplius in cælo.9 Et projectus est draco ille magnus, serpens antiquus, qui vocatur diabolus, et Satanas, qui seducit universum orbem: et projectus est in terram, et angeli ejus cum illo missi sunt.

Link to comment
Share on other sites

You should generate HTML.

#include <IE.au3>

$file = @scriptdir & "\output.htm"
FileWriteLine($file,"<b>Bold text</b>")

$oIE = _IECreate ($file)
_IEAction ($oIE, "printdefault")
_IEQuit ($oIE)
Thanks for the advice I was surfing somewhere and didn't notice that you have posted, thanks. I need a way to hide the "guts/entrails" of my program

Rev 127 Et factum et prælium magnum in cælo: Michaël et angeli ejus præliabantur cum dracone, et draco pugnabat, et angeli ejus: 8 et non valuerant, neque locus inventus est eorum amplius in cælo.9 Et projectus est draco ille magnus, serpens antiquus, qui vocatur diabolus, et Satanas, qui seducit universum orbem: et projectus est in terram, et angeli ejus cum illo missi sunt.

Link to comment
Share on other sites

thanks lod3n, I will give your suggestion a try [i have not searched enoug in _IEAction too much and perhaps there is a way].. (no autoit installed in this computer...), and of course thanks /dev/null. I will post here again if problems arise.

;- Nice blog lod3n

Edited by Qsr Nrwn

Rev 127 Et factum et prælium magnum in cælo: Michaël et angeli ejus præliabantur cum dracone, et draco pugnabat, et angeli ejus: 8 et non valuerant, neque locus inventus est eorum amplius in cælo.9 Et projectus est draco ille magnus, serpens antiquus, qui vocatur diabolus, et Satanas, qui seducit universum orbem: et projectus est in terram, et angeli ejus cum illo missi sunt.

Link to comment
Share on other sites

If you are looking to do it hidden, you can invoke IECreate with the hidden option:

#include <IE.au3>

$file = @scriptdir & "\output.htm"
FileWriteLine($file,"<b>Bold text</b>")

$oIE = _IECreate ($file,0,0)
_IEAction ($oIE, "printdefault")
_IEQuit ($oIE)

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

If you are looking to do it hidden, you can invoke IECreate with the hidden option:

#include <IE.au3>

$file = @scriptdir & "\output.htm"
FileWriteLine($file,"<b>Bold text</b>")

$oIE = _IECreate ($file,0,0)
_IEAction ($oIE, "printdefault")
_IEQuit ($oIE)
Thanks lod3n!!

Does exactly what I need...

Next time I will read all options from a UDF :) (Of course, if I'm not too tired... [No sleep for about 36 hours in a row])

Rev 127 Et factum et prælium magnum in cælo: Michaël et angeli ejus præliabantur cum dracone, et draco pugnabat, et angeli ejus: 8 et non valuerant, neque locus inventus est eorum amplius in cælo.9 Et projectus est draco ille magnus, serpens antiquus, qui vocatur diabolus, et Satanas, qui seducit universum orbem: et projectus est in terram, et angeli ejus cum illo missi sunt.

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