Skip to content

Instantly share code, notes, and snippets.

@mindey
Last active July 22, 2019 18:19
Show Gist options
  • Save mindey/df7a89520605da569adc73f5df752b4d to your computer and use it in GitHub Desktop.
Save mindey/df7a89520605da569adc73f5df752b4d to your computer and use it in GitHub Desktop.
# inspired by:
# https://www.halfbakery.com/idea/Mirrored_20Mouse
import pyautogui
width, height = pyautogui.size()
def mirror(duration=0.0):
current = pyautogui.position()
new_x = width - current.x
new_y = height - current.y
pyautogui.moveTo(new_x, new_y, duration=duration)
if __name__ == '__main__':
mirror()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment