aboutsummaryrefslogtreecommitdiff
path: root/AutopyExtended/mouse.py
diff options
context:
space:
mode:
Diffstat (limited to 'AutopyExtended/mouse.py')
-rw-r--r--AutopyExtended/mouse.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/AutopyExtended/mouse.py b/AutopyExtended/mouse.py
index 0b06c11..f79255f 100644
--- a/AutopyExtended/mouse.py
+++ b/AutopyExtended/mouse.py
@@ -1,4 +1,10 @@
import autopy
+import time
-def move(target, time, curve, time_scale=(lambda x : 1 * x)):
-
+def move(curve, time_target, time_scale=(lambda x : 1 * x)):
+ start = time.time()
+ delta = 0
+ while(delta < time_target):
+ point = curve.point(time_scale(delta), time_target)
+ autopy.mouse.move(point[0], point[1])
+ delta = time.time() - start