From 2c83414e4f944d8e669c386996e33376785e534d Mon Sep 17 00:00:00 2001 From: Simon Verhoeven Date: Wed, 5 Oct 2022 07:07:55 +0200 Subject: [PATCH] Added a script to move the cursor every 15 seconds --- MouseMover/MouseMover.py | 9 +++++++++ MouseMover/README.md | 13 +++++++++++++ README.md | 3 +++ 3 files changed, 25 insertions(+) create mode 100644 MouseMover/MouseMover.py create mode 100644 MouseMover/README.md diff --git a/MouseMover/MouseMover.py b/MouseMover/MouseMover.py new file mode 100644 index 00000000..d6d9579c --- /dev/null +++ b/MouseMover/MouseMover.py @@ -0,0 +1,9 @@ +import win32api, win32con, time, random +def click(x,y): + win32api.SetCursorPos((x,y)) + win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0) + win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0) + +while True: + click(random.randint(0, 100), random.randint(0,100)) + time.sleep(15) \ No newline at end of file diff --git a/MouseMover/README.md b/MouseMover/README.md new file mode 100644 index 00000000..bd92b3e1 --- /dev/null +++ b/MouseMover/README.md @@ -0,0 +1,13 @@ +This repository consists of a list of python scripts to automate few tasks. + +You can contribute by adding more python scripts which can be used to automate things. Some of already done are listed below. +Incase you have anything to be followed while executing the python script mention it as well + + +# Python Script + + +## Script - Chessboard + +Moves your mouse every 15 seconds +MouseMover.py \ No newline at end of file diff --git a/README.md b/README.md index 89ce3808..c773d85a 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,6 @@ Create a star pattern pyramid ## Script 13 - compound interest calculator calculate compound interest + +## Script 14 - Mouse mover +Moves your mouse every 15 seconds \ No newline at end of file