← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #669822]: How do I make sikuli search only to the left of current mouse position?

 

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

masuo proposed the following answer:
order to limit the scope of the search, set the Region where you want to search.
then use find feature.

use Env.getMouseLocation() to get the current location of the mouse cursor.
ml = Env.getMouseLocation()

use Region() to define region where you want to search.

rfull = Region(getBounds())
rleft = Region(0, 0, ml.getX(), rfull.getH())

rleft.find("image.png")

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