View Single Post
  #3  
Old 11-19-2013, 03:59 AM
javadi javadi is offline
Member
 
Join Date: Mar 2013
Location: London
Posts: 33
Hi Jeff

Very many thanks for the code. What is the difference between your code and simply using the following code as you also use win32api?

win32api.SetCursorPos((int(x), int(y)))

This is a nice piece of code demonstrating it

Code:
import win32api
import time
import math

for i in range(100):
    x = 500+math.sin(math.pi*i/100)*500
    y = 500+math.cos(i)*100
    win32api.SetCursorPos((int(x), int(y)))
    time.sleep(.1)
Greetings
Amir
Reply With Quote