Question

I get this error:

Traceback (most recent call last):
  File "<pyshell#68>", line 1, in <module>
    mouse.toggle(down, button=LEFT_BUTTON)
NameError: name 'down' is not defined

And this shows up on Help:
toggle(down, button=LEFT_BUTTON) -> None

So, yes. I can't seem to make mouse.click and mouse.toggle to work. mouse.get_pos() and mouse.smooth_move() and mouse.move() works just fine. Any ideas on what the problem here is?

Was it helpful?

Solution

mouse.toggle(down, button=LEFT_BUTTON) is not the proper use of autopy.mouse

mouse.toggle(True, button=LEFT_BUTTON) or mouse.toggle(False, button=LEFT_BUTTON) are the correct usage

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top