Skip to content

Commit

Permalink
Added a right click before left click
Browse files Browse the repository at this point in the history
  • Loading branch information
skasero committed Feb 4, 2021
1 parent 3f7010b commit d53f454
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ def clickImage(self, x, y, duration = 0.5):
# print(f'Moving mouse to x: {x}, y: {y}')
pyautogui.moveTo(x,y,duration)
# pyautogui.click(button='left') # This doesn't click in league, it maybe too fast

## Added a right click to make sure that the bot is clicked ingame before executing a left click
pyautogui.mouseDown(button='right')
pyautogui.mouseUp(button='right')
time.sleep(0.25)
pyautogui.mouseDown()
pyautogui.mouseUp()

Expand Down

0 comments on commit d53f454

Please sign in to comment.