GetText in Windows 10

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

GetText in Windows 10

Post by Jerry Thomas » Mon Apr 04, 2016 4:08 pm

I have a script that has been running for a couple years on Win7.
On a machine that I upgraded to Win10 it fails where I was grabbing some text off of the screen.

I have tried the GetText variations and GetWindow variations.
I have tried the TextCaptureWizard.

None of these get the text I need.
(Application is written Delphi 8(?)).

Is my best option to go with OCR?

I am verifying & testing this issue with a basic simple script:

Code: Select all

GetTextInit
GetTextAtPoint>108,68,result,0
MDL>result
Wait>1
Thanks,
Jerry

[email protected]

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

Re: GetText in Windows 10

Post by Marcus Tettmar » Tue Apr 05, 2016 10:36 am

Unfortunately many of the text rendering APIs have been changed in Windows 10 so where you might once have been able to capture text you may not now be able to in Windows 10. So you would need to use a different method.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Re: GetText in Windows 10

Post by Jerry Thomas » Tue Apr 05, 2016 1:56 pm

Is there a recommended /suggested approach (until you catch up with the new Windows APIs)?
Thanks,
Jerry

[email protected]

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

Re: GetText in Windows 10

Post by Marcus Tettmar » Wed Apr 06, 2016 9:03 am

You could try the UIAccessible functions. As always I'm afraid it's a case of trial and error - try the wizards and all the functions to see what can be capturable. Fall back on copy to clipboard if the text can be selected.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Re: GetText in Windows 10

Post by Jerry Thomas » Wed Apr 06, 2016 3:43 pm

Looks like I am out of luck until you get new functionality going!

Thanks for help!
Thanks,
Jerry

[email protected]

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Re: GetText in Windows 10

Post by Jerry Thomas » Fri Feb 10, 2017 7:08 am

Any updates on being able to grab text from Win10?
Thanks,
Jerry

[email protected]

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

Re: GetText in Windows 10

Post by Marcus Tettmar » Fri Feb 10, 2017 7:41 am

I can grab text in Windows 10. It will vary from app to app however, and some apps which may have been "grabbable" in previous Windows versions may not be now. Some Windows 10 apps have changed massively in the way they output text. Others haven't.

So e.g. text capture in IE11 still works fine for me in Windows 10. But won't in Edge.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: GetText in Windows 10

Post by CyberCitizen » Mon Feb 13, 2017 3:51 am

Jerry Thomas wrote:Any updates on being able to grab text from Win10?
Jerry, This is not a Macro Scheduler issue but a function of Windows that has changed, its not so much that MS needs to be updated to capture the text but more that Microsoft has changed a function as per below and what was once possible may no longer be, could be a number of reasons as to why. I have had success with Tesseract-OCR depending on the content and the size etc, however need to look at all the functions of getting the text first, it might still be possible.
Marcus Tettmar wrote:Unfortunately many of the text rendering APIs have been changed in Windows 10 so where you might once have been able to capture text you may not now be able to in Windows 10. So you would need to use a different method.
Jerry Thomas wrote:Is there a recommended /suggested approach (until you catch up with the new Windows APIs)?
FIREFIGHTER

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Re: GetText in Windows 10

Post by Jerry Thomas » Mon Feb 13, 2017 4:00 am

I was hoping MS would be able to come up with a way to deal with Microsoft's "Improvements"
I really don't want to have to move to a different automation tool!
Thanks,
Jerry

[email protected]

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