SavinaRoja / PyUserInput

A module for cross-platform control of the mouse and keyboard in python that is simple to install and use.
GNU General Public License v3.0
1.07k stars 244 forks source link

Click not reliable on MacOS Sierra when using time.sleep() #102

Open vilvadot opened 6 years ago

vilvadot commented 6 years ago

Im experiencing a weird behaviors on Mac OS Sierra 10.12.3

Using simple code like this:

m.move(245,591)
m.click(245,591,1)
m.move(82,773)

Works fine (although click wont work unless I move the mouse there first). But if I introuduce a single time.sleep().

The click breaks, even if its before the sleep 😕

m.move(245,591)
m.click(245,591,1)
time.sleep(1)
m.move(82,773)

Any idea of what is happending.

BTW, thanks for the library it rocks! Tested capturing mouse position and works like a charm.