← 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

RaiMan proposed the following answer:
Yippie, a challenge :-)))

Settings.MoveMouseDelay=0
import math as m
pi = m.pi

circle = []
for n in range(0, 370, 1):
    y = int(100*m.sin(m.radians(n)))
    x = int(100*m.cos(m.radians(n)))
    circle.append(Location(200+x, 200+y))

for p in circle: hover(p)

makes a circle with radius 100 pixel at center (200,200) stepping with a stepping of 1 degree.
this is interestingly slow.

the smaller the circle, the larger the stepping might be and vice-versa.

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