How to find only within a region?
Sometimes it is desirable to tell Sikuli to search only within a certain region instead of the entire desktop. For example, we may want Sikuli to play Bejeweled for us. There's no need to Sikuli to pay attention to areas outside the game board. Thus, it makes sense to restrict the search to a particular region as follows.
1. Click the Region toolbar icon to define a region on the desktop.
2. Call inside() and find() to find the orange jewel by checking only inside the specified region.
.inside().find(
)
Attachments
-
region.png
(14.4 KB) - added by tomyeh
2 years ago.
-
hex.png
(1.4 KB) - added by tomyeh
2 years ago.
-
toolbar_region.png
(9.5 KB) - added by tomyeh
2 years ago.
-
bejeweled.png
(220.5 KB) - added by tomyeh
2 years ago.

.
)