Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mouse.move doesnt accept a list #117

Closed
Motzumoto opened this issue Jun 8, 2022 · 2 comments
Closed

mouse.move doesnt accept a list #117

Motzumoto opened this issue Jun 8, 2022 · 2 comments

Comments

@Motzumoto
Copy link

Doing this:

button_left = [400, 960]
button_middle = [480, 960]
button_right = [580, 960]
button_choices = [button_left, button_middle, button_right]
mouse.move(random.choice(button_choices))

TypeError: move() missing 1 required positional argument: 'y'

Is there some other way i can do this?

@mudkipdev
Copy link

mudkipdev commented Jun 21, 2022

mouse.move accepts x and y arguments. Have you considered doing one of the following?

choice = random.choice(button_choices)
mouse.move(choice[0], choice[1])
choice = random.choice(button_choices)
mouse.move(*choice)
choice_x, choice_y = random.choice(button_choices)
mouse.move(choice_x, choice_y)

@Motzumoto
Copy link
Author

mouse.move accepts x and y arguments. Have you considered doing the following?

choice = random.choice(button_choices)
mouse.move(choice[0], choice[1])

I have not considered that, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants