0
votes

I want Sikulix to search only in a certain region of my second screen.

So far my knowledge comes down to having either a part of my first (main) screen like:

topLeft = Location(reg.x, reg.y)

Or the whole second screen like:

regscreen2 = Screen(2)

Is there a way to specify part of monitor 2?

I can only imagine something like the code below but it doesn't work...:

regiontopLeftScreen2 = topLeft.Screen(2)

1

1 Answers

0
votes

Note that when you find a pattern on a screen, it returns Match object. Both, Screen and Match extend Region class which is the one that exposes all find methods. Hence, what you can do is just search within the resulting region just as you did with the screen.

For example:

Screen s = new Screen();
Match m = s.find("pattern1.png");
Match m1 = m.find("pattern2.png");
// etc...