AutoHotkey Community

It is currently May 26th, 2012, 3:11 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: April 4th, 2008, 11:41 pm 
Offline

Joined: April 4th, 2008, 11:21 pm
Posts: 15
I've started becoming rather proficient with AutoHotkey, but I'm having troubles getting a page break into MSWord.

The situation is as follows, I am taking a block text from a .txt document and fileappending it straight to a .doc file which I create using AHK. While this works for one block of text, I would like this to be looped for many blocks of text that are separated by a new page.

I have tried using AHK to open the document in word, read a block of text, send the block of text, then send ^{enter}, and manually break the page. While I get all the text (except for the # sign...which is confusing, but oh well), I lose a bit of the formating I wish to keep. Some of the text is indented and some is not. Using the Send command with FileRead or a Read_Line loop just is not preserving the indentations that I need.

I've been racking my brain, and I can't seem to come up with a solution that doesn't involve me learning how to write a printer driver.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 12th, 2008, 7:27 pm 
Offline

Joined: April 4th, 2008, 11:21 pm
Posts: 15
One bump, then I'll let this die.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 12th, 2008, 8:04 pm 
Offline

Joined: October 12th, 2006, 9:57 pm
Posts: 99
Location: Canada
You could give more details on what you're doing. As far as I know, AHK cannot create a MS Word file. It can create a file with the extension *.doc, but it is simply a plain text file.
One solution would be to study a little bit of the Rtf specs. and find out what code it uses to represent a page break, then append that code in all new text you insert in you *.rtf file.
Rtf is a plain text file not a binary like ms word doc. So manipulating text becomes easy.

I hope this helps, I'm very limited in my autohotkey skills to help you more.

_________________
The best things of life are free.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Pulover and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group