Skip to content

Can't Get Click To work? #304

Answered by spyoungtech
glass22 asked this question in Q&A
Discussion options

You must be logged in to vote

win.click expects separate x,y arguments. It's not quite consistent with the regular click function, which also accepts a tuple in place of the x argument.

You could make a small adjustment and use * unpacking to do this:

- win.click(myK.get_mouse_position())
+ win.click(*myK.get_mouse_position())

Or in the latest version of the library, you can also do something like this:

pos = myK.get_mouse_position()
win.click(pos.x, pos.y)

Also what paramaters does control_click() need?

You can always look at the signature in the code or in the api documentation:

The meanings of the arguments should either be plain or the same as in …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by spyoungtech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants