Hi. I need to copy text from one place to another in the same window. But I can see that the source area is not plain text you can just copying by right clicking mouse and paste it some where else.. It is a more like a part of the program somehow.
I need the macro to identify it as text and pass it somewhere else as real text.
But how ??
________
vaporizers
extract text from picture
Moderators: JRL, Dorian (MJT support)
extract text from picture
Last edited by Machariel on Tue Feb 01, 2011 11:34 pm, edited 1 time in total.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You may be able to use the text capture commands (GetTextAtPoint, GetTextInRect, GetWindowTextEx). Try the example to see if the text you want can be captured:
http://www.mjtnet.com/blog/2008/01/03/s ... e-example/
If the text is actually part of an image then you're probably out of luck unless you are prepared to try using OCR:
http://www.mjtnet.com/forum/viewtopic.php?t=4147
http://www.mjtnet.com/blog/2008/01/03/s ... e-example/
If the text is actually part of an image then you're probably out of luck unless you are prepared to try using OCR:
http://www.mjtnet.com/forum/viewtopic.php?t=4147
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?
just now tryed the capture text commands, and it can't see eanything at all in the program window.. And I don't think OCR will work either as I have read it only works on .gif and .tiff pictures. And don't think it is pictures at all, but somehow part of the interface. I have found out that the program is developed in Python Programming Language.
How to extract readable text from that ?
________
justin bieber fan
How to extract readable text from that ?
________
justin bieber fan
Last edited by Machariel on Tue Feb 01, 2011 11:34 pm, edited 1 time in total.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
OCR can be performed against BMP files. You can capture the screen to a BMP file. Therefore you can OCR the screen. The above link shows a script which uses the Microsoft Office OCR engine to do just that.
I don't know whether/how text from Python apps can be captured.
I don't know whether/how text from Python apps can be captured.
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?