Our app is Delphi based and uses TPanel class displays for a lot of the numeric data.
I have tried the usual ways of getting text: GetControlText, GetTextAtPoint, GetTextInRect, GetWindowText, GetWindowTextEx.
These work where we have 'regular' text but not on the TPanels.
Here is a snippet from the System Windows tool
330770 - TGroupBox "Nozzle Position"
- 724926 - TPanel " -6.375"
- 1380106 - TPanel " 1.275"
I can get the TGroupBox label but not the TPanels.
GetControlText>OMAX*,TPanel,1,strText
strText is blank
I wrote a screen capture and compare routine to read one character at a time. The problem is, depending on the application mode and the OS, I have several possible 'styles' (yellow, green, red, and WinXP displays differently than Win7!). I am trying to not have 6 different sets of characters to compare against.
I have tried a couple of different OCR tools, with no luck.
Any suggestions?
Getting text from Delphi TPanel object
Moderators: JRL, Dorian (MJT support)
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
GetWindowTextEx, GetTextInRect and GetTextAtPoint should all work with Delphi TPanel objects.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA