← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #662358]: Finding in a region inside a captured image

 

Question #662358 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/662358

Description changed to:
Hi,

I'm making a bot for a game (it's a match 3, like bejeweled/candy
crush), and I'm trying to recognize the state of the game in a grid by
looking at each of the grid cell and comparing with a set of predefined
images.

So what I do is to loop for each cell in the grid (x, y, width and
height) and check if each predefined image is in that region. The
problem is that it's quite slow because I think it tries to capture the
region each time I use .exists.

Since the game doesn't change while I don't make an action, I don't need
to recapture the screen for each cell, I can capture only once and then
search in regions of the image. Can I do that somehow?

Thanks.

Edit:

Oh, and I'm using the python script inside the editor. But I can use
something else like the java api if required.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.