match pictures

Asked by joel mercado

hi everyone can anybody help me, i want to search a picture in a certain region and
if found search again the matched picture in other certain region and click it
how should i do it,, where to start...
thank you very much

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

reg1 = Region() # somehow define the first region
reg2 = Region() # somehow define the second region
img = "some_picture.png"

if reg1.exists(img):
    print "found in reg2"
    if reg2.exists(img):
        print "found in reg2"
   else:
        print "not found in reg2"
else:
    print "not found in reg1"

Revision history for this message
joel mercado (joel-mrcd) said :
#2

thank for quick reply...i will try this sir..

Revision history for this message
joel mercado (joel-mrcd) said :
#3

sir i want the matched picture from reg1 to be clicked reg2.. is it posible to put a loop in the script? how?

Revision history for this message
RaiMan (raimund-hocke) said :
#4

look faq 1437

and some other valuable faqs for scripting Sikuli
https://answers.launchpad.net/sikuli/+faqs

Revision history for this message
joel mercado (joel-mrcd) said :
#5

thank you sir....

Can you help with this problem?

Provide an answer of your own, or ask joel mercado for more information if necessary.

To post a message you must log in.