GetTextPos not working at all, any ideas as to why?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
jason.skarsten
Newbie
Posts: 1
Joined: Mon Feb 19, 2018 4:05 pm

GetTextPos not working at all, any ideas as to why?

Post by jason.skarsten » Mon Feb 19, 2018 4:10 pm

Why does the following not find the text "Domain"?

Looked thru 2012 and 2013 posts that had issues with GetTextPos, but can't find any recent posts relating to this.
Is there still an issue with using the 64bit version?

intLeft,intTop,intRight,intBottom will all be set to -1 --- because GetTextPos can't find the text

Code: Select all

//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1
IESetTimeout>10,ie_res
IECreate>IE[0]
IENavigate>%IE[0]%,http://www.example.com/,ie_res
Wait>2
WindowAction>1,Example*
Wait>2
IEWaitDocumentComplete>%IE[0]%,ie_res
Wait>2
SetFocus>Example Domain - Internet Explorer
gettextinit
GetTextReset
GetWindowTextEx>Domain*,strText
//GetTextPos>Domain,intLeft,intTop,intRight,intBottom
GetTextPos>GetTextPos,intLeft,intTop,intRight,intBottom
Message>Done

**BREAKPOINT**

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: GetTextPos not working at all, any ideas as to why?

Post by Marcus Tettmar » Tue Feb 20, 2018 6:25 pm

I'm afraid the text capture functions won't work with everything and with each new version of Windows they have become less and less useful. They are also very low level, highly technical and also somewhat invasive in the way that they have to hook into every process. This is the main reason we introduced OCR which can work above all that and with any technology.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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