DarkAngelBGE Posted May 1, 2007 Share Posted May 1, 2007 Hi all, what I want to this print sheets of papers for dynamic names. It's for an election program...basically I add names to a list and then want to print vote sheets for each of the candidates. How can this be done in AutoIt? What I will need to do is print a name say 3cm from the top left corner of the sheet (as the name goes there in the template). Thanks for any help in advance! Link to comment Share on other sites More sharing options...
DarkAngelBGE Posted May 1, 2007 Author Share Posted May 1, 2007 I was thinking of using IE and CSS to do what I need. #include <IE.au3> $file = @scriptdir & "\output.htm" FileWriteLine($file,"<b>Bold text</b>") $oIE = _IECreate ($file,0,0) _IEAction ($oIE, "print") _IEQuit ($oIE) However, when I try this code no printer dialog box opens for me. Link to comment Share on other sites More sharing options...
Shevilie Posted May 1, 2007 Share Posted May 1, 2007 Have a search in the helpfile or on the forum for a start !! _FilePrint ( $s_File [, $i_Show] ) #include <File.au3> $file = FileOpenDialog("Print File", "", "Text Documents (*.txt)", 1) If @error Then Exit $print = _FilePrint($file) If $print Then MsgBox(0, "Print", "The file was printed.") Else MsgBox(0, "Print", "Error: " & @error & @CRLF & "The file was not printed.") Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
longtex Posted May 1, 2007 Share Posted May 1, 2007 I saw a reference to a "Word Automation Library", which I assume refers to M$ Word - I haven't looked at it too hard, but it might have some pertinence here.Now, the question is, does it have any pertinence to Open Office? Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too? Link to comment Share on other sites More sharing options...
DarkAngelBGE Posted May 1, 2007 Author Share Posted May 1, 2007 @Shevilie: Hrm, I guess you did not understand what I was saying. I need formatting...like dynamic text from 3cms of the left top corner of the paper. Simply printing a file is not what I need. @longtex: Got any link for me please? Link to comment Share on other sites More sharing options...
DarkAngelBGE Posted May 1, 2007 Author Share Posted May 1, 2007 Nvmind, got it to work, thanks. Link to comment Share on other sites More sharing options...
longtex Posted May 1, 2007 Share Posted May 1, 2007 @Shevilie: Hrm, I guess you did not understand what I was saying. I need formatting...like dynamic text from 3cms of the left top corner of the paper. Simply printing a file is not what I need. @longtex: Got any link for me please?Er, uh, I haven't tried setting these cute little internal links, so I'll just tell you where I found it -Go to Example Scripts and search "word automation library" and it'll be right there for you... Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too? Link to comment Share on other sites More sharing options...
Shevilie Posted May 1, 2007 Share Posted May 1, 2007 Or look in my signature You would find a long list there of stuff you can use Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
gseller Posted July 4, 2007 Share Posted July 4, 2007 Nvmind, got it to work, thanks. DarkAngelBGE You say you got it to work, can you share, might help someone else in the future.. 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