Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] Custom "wait for change"
#1
Hi,

I want to search for a piece of text in firefox and do some stuff IF that text is found.

I tried using wait for change to no avail. Is there a function or a way to * almost * do the same thing? Here's how it would look like

1. get first screen shot within an area
2. find text
3. get second screen shot within an area
4. compare screen shots.
5. If 4 is different then do stuff.

I hope that makes sense. I'm definitely open to any solution that achieves the goal.
#2
To find text in screen shots need an OCR function, QM does not have it.
Can you use accessible objects instead? Although there is no function 'wait until accessible object text will change to anything different than initial text', but you can repeatedly get text of the found object and break when it is different than initial text.
#3
edit: your text idea worked like a charm. Thanks for another quick and elegant solution.

Trying to avoid using accessible object because I want this tool to work on all browsers, but your other idea makes sense. I'll try that. Thanks. Also. Can you give an example of using this "<open "CaptureImageOnScreen" and saving it to a bitmap handle? If the text thing doesn't work, I want to scan images as a solution. Thanks again, Gintaras.
#4
Macro Macro2738
Code:
Copy      Help
__GdiHandle h
if(!CaptureImageOnScreen(25 10 20 20 "" h)) ret
scan F"hbitmap:{h}" 0 0 3
#5
Oh, what is this?
#6
Quote:Can you give an example of using this "<open "CaptureImageOnScreen" and saving it to a bitmap handle? If the text thing doesn't work, I want to scan images as a solution.
Also added 'scan...' to show how the handle can be used with scan.
#7
ahh. my bad! Thanks.


Forum Jump:


Users browsing this thread: 1 Guest(s)