How to align images with Sikuli Automation

Asked by Nobody

I'm trying to automate a simple game which has mini games in it. I'm trying to automate 2 mini games which i have trouble doing.

1. matching the color in the center with the color on the side. Let's assume X is the color in the center.

    A
B X C
    X

So if X on the bottom matches the center, I need to swipe down. If X is on the right, then swipe. The image are similar but on the side is a 'long' version of the image in the center. How can i do that?

2. Aligning images (sort of like 4 in a row game)

        ABC
ABCXXX
        ABC

basically the center row can be dragged left or right. I need to align the ABC to the top and bottom. How can I do that in sikuli?

I'm using the IDE to do that. So the language is jython i believe.

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

Not really clear what your problems are.

Something to watch (link, image samples, code snippets, ...) would be helpful.

Revision history for this message
Nobody (nobodyz) said :
#2

here is for part 2.

https://postimg.cc/PCtcyQLJ

basically, i need to drag the center line left/right to align to the top and bottom.
i dont have any code snippets yet, still trying to figure out how to start..

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

here is something to play with:
https://www.dropbox.com/s/36uaf2n2i4labwo/gameSX.zip?dl=0

- unzip
- open the game.py in the IDE
- make the image align.png visible in a frontmost window
- realign the gameTop region to your screen layout
- run the script

try to understand, what's going on ;-)

Revision history for this message
Nobody (nobodyz) said :
#4

Thanks @RaiMan! Will take a look!

Can you help with this problem?

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

To post a message you must log in.