Text Capture: GetTextPos

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
byersjt
Newbie
Posts: 4
Joined: Mon Jul 29, 2013 1:55 am
Location: Houston

Text Capture: GetTextPos

Post by byersjt » Wed Jul 31, 2013 2:52 am

I have written a script to plug in a name and address to then get that person's phone number.

Trying both IE 10 and Chrome Version 28.0.1500.72, I open the website Spokeo.com. I put in a Name, City, State and search. I then click on an address, which opens the profile page.

I need to be able to get the position of the header with the value "Phone Number", under which is the phone number. So, I use the GetTextPos call, like this:

SetFocus>Spokeo*
GetTextInit
GetTextPos>Phone Number,iLeft,iTop,iRight,iBottom

Even though I can see "Phone Number" on the Web Page, the GetTextPos always returns position values of -1.

If I call GetTextAtPoint passing the X,Y position of the "Phone Number" text, it gets it. But GetTextPos fails.

Am I doing something wrong? Also, please realize that I know of other methods to get the phone number, but I need GetTextPos to work. It fails to work for me on these Web pages, period, and I cannot always use a workaround. This is a clear example to duplicate the problem. Thank you.
James Byers

djs
Junior Coder
Posts: 47
Joined: Sun Apr 29, 2012 4:21 pm

Post by djs » Wed Jul 31, 2013 2:00 pm

You might want to review this thread:
http://www.mjtnet.com/forum/64-bit-gett ... t7284.html

Its a known issue on 64 bit platforms. I haven't tried it in a while, but it did work properly for me on 32 bit machines previously.

Dan

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts