I'm trying to use Textract for screen OCR, as described by Marcus in a post HERE.
The problem that I have is that the underlying application is not well behaved. The cell from which I am trying to extract data changes width unpredictably. This cell doesn't have much on either side of it, so I can partially resolve the problem by just making the capture window so large that no matter where the numerical data is entered, it's always in the capture window. The problem is that the numbers I want are followed by a percent sign (%), which I don't want. I could screen that out by setting the OCR window to exclude it, except for this problem of the cell getting wider, and the numbers inside then being in a different screen position.
Any ideas as to how can I resolve this with a minimum of complexity?
Thanks.
Screen OCR problem
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
What kind of text are you trying to extract and from what application? You may not need to use OCR. You may be able to use the built-in text capture functions.
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?
Hi CarlosR,
If the other methods Marcus mentioned don't work, then assuming you are using Textract and have increased the capture window large enough so that you always get your data into a variable (let's call it my_var)... if the problem is only that the data includes the percent % sign at the end... you can get rid of any percent signs with just one Macroscript command:
If the other methods Marcus mentioned don't work, then assuming you are using Textract and have increased the capture window large enough so that you always get your data into a variable (let's call it my_var)... if the problem is only that the data includes the percent % sign at the end... you can get rid of any percent signs with just one Macroscript command:
- StringReplace>my_var,%,,my_var_no_percent_signs
Last edited by jpuziano on Wed Jan 07, 2009 5:29 pm, edited 2 times in total.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
