mlpdx Posted October 16, 2008 Share Posted October 16, 2008 Is it possible to get the line position of the cursor in a word document? I wanted to count the number of lines in a Word document. I thought I could do this by doing a loop with sendkeys({DOWN}) and checking the cursor X, Y at each iteration (when Y doesn't increment, I'd hit the bottom of the doc), but it doesn't look like I can get the cursor position. WinCaretPos is returning something else that doesn't change as the cursor moves down the doc, and the mouse coords aren't related to the cursor position either. Link to comment Share on other sites More sharing options...
martin Posted October 16, 2008 Share Posted October 16, 2008 Is it possible to get the line position of the cursor in a word document? I wanted to count the number of lines in a Word document. I thought I could do this by doing a loop with sendkeys({DOWN}) and checking the cursor X, Y at each iteration (when Y doesn't increment, I'd hit the bottom of the doc), but it doesn't look like I can get the cursor position. WinCaretPos is returning something else that doesn't change as the cursor moves down the doc, and the mouse coords aren't related to the cursor position either.Probably you need to look at big_daddy's Word UDF. 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 More sharing options...
mlpdx Posted October 17, 2008 Author Share Posted October 17, 2008 Thanks, I checked it out... looks like a wrapper around COM access to Word, but nothing that directly can tell me where the insertion point is. Maybe there is some way to do that with COM, but that's outside of my limited knowledge at this point! 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