Hi! Yes, the fact you had moved and resized the screen it came into view. Several pixels is only one char and not capture much if anything before such a move, once out on the boundary. The pain when having many windows on a screen and they merge. As chip says, the clip gets the actual data where as the screen point gets what windows wants you to see...
There is a big difference between the 2 ways of getting the data. If I remember correctly a window has the layout and what is there and that is only what windows places there. The clip is the data and the screen is what of that data gets on the screen... Bruce Sent: Sunday, September 15, 2013 9:50 PM Subject: Re: text.nextline In my case, the lower left reported as being at 55x902 and the first character on the last line was at 61x885. I thought it was probably just that the window rectangle would be just outside this last line. So when And by moving in by 8x15 I consistently found the last line as the window was resized and moved. Thanks again Chip and Bruce. Jonatahn Best wishes, Jonathan On Sep 15, 2013, at 9:10 PM, Chip Orange wrote: Jonathin, I too have had some issues with the accuracy of the text object as it relates to text returned for a given location. I reported these issues to GW some time back, and as I recall, it was related to converting from windows to screen coordinates. In my app I wanted to get the text of the current line as indicated by the cursor, and something was forcing me to go through these conversion between units, and I was finding that sometimes the text object would return an empty line, and I’d have to go up/down by a pixel or two (after the conversion) before it would return the text of the current line. As I mention in class 15, it’s not an entirely reliable way to retrieve text; you can often do better using the clips collection. But if text is what you really need, do try adjusting your position up or down by just a pixel if you’re being returned an empty string, and then try a second time. This is what I eventually had to do in the “Word Advanced Features” app in order to get text to give me the text of the current line. Hth, Chip From: Jonathan Cohn [mailto:jon.c.c...@gmail.com] On Behalf Of Jonathan C. Cohn Sent: Sunday, September 15, 2013 6:15 PM To: gw-scripting@gwmicro.com Subject: Re: text.nextline Bruce, Thanks for the class notes from Chip, everybody does have access to these via the GWMicro web site, though I do appreciate the research efforts. I was attempting to re-do some examples from jaws training to show to my co-workers. One of the the labs moves the jaws cursor to the bottom of the current window and then speaks the information. I was able to do this fairly easily, but then realized that with the text object I should be able to get data from any line on the screen without moving either the mouse or we-cursor. I got the outline windows rectangle converted that to a screen rectangle and then asked for the line of text starting at the bottom right of the window. I was finding that the function was recovering the line just below and to the left of the current window. I had to remember learn that I needed a copy of the text object. I was not able to determine a good method to move just inside of the outlines edge and just changed my starting point by 20 pixels vertically. I was hoping that the text.priorline would work but had no success there. Best wishes, Jonathan