← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #220679]: Continuous drag in circle

 

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

Roman Podolyan proposed the following answer:
The hardest part is how to get the array of vectors for moving mouse with mouseMove, but I think it can be solved too: 
 
Choose radius R you want for circling 
Choose center point of circle (X,Y). 
Now you need to draw 4 quarters of circle. 
Let's start from X,Y+R and go clockwise.
Going from point X+1,Y+R down, we are looking for first point on X+1 vertical which will be close to (X,Y) than R.
When found, we can record move "vector", required for moving with mouseMove to this point from (X,Y+R).
Than doing the same for X+2 vertical from point X+2,Y+R, and so on...
In the end we will get array of vectors, moving us from X,Y+R to X+R,Y as close to R-radius circle as we can be.
Than we can calculate waypoints and vectors to move from X+R,Y to X,Y-R , and so on

Got the idea?

It's just dirty solution, maybe someone will post better way for that.

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