← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #225412]: Sikuli mouse movement location

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Env.getMouseLocation() only returns the current location of the mouse
pointer and cannot be used to set it like Env.getMouseLocation(x,y).

Use 
hover(Location(x,y)) instead to move the mouse pointer to the point (x,y) on the screen.

Your challenge is rather complex for someone saying:  I am not familiar
with this coding.

You have to find all wheat first (may be restricted to some rectangle
area around your current location) and then calculate the distance to
your current location of each found wheat, to select the nearest one.

if you want to create more complex scripts beyond a series of
find/wait/click, you have to dive into some scripting with Python/Jython
(faq 1858) and read/understand the features of Sikuli
(http://doc.sikuli.org).

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.