ourEvent = CGEventCreate(None)
currentpos = CGEventGetLocation(ourEvent)
mouseclickdn(60, 100)
mousedrag(60, 300)
mouseclickup(60, 300)
time.sleep(1)
mousemove(int(currentpos.x), int(currentpos.y))
How can I control the keyboard and mouse with Python?