top of page

Mouse & Keyboard Bot

This article illustrates how to automate mouse and keyboard movements using pyautogui module in python. This module is not preloaded with python.


So to install it run the following command:

​pip3 install pyautogui

The code shows how to move the mouse using coordinates and send a message in predefined seconds.


Code:

import pyautogui as pg import time def codehere(): pg.click(807, 979) pg.typewrite("hello") pg.typewrite(["enter"]) time.sleep(2) pg.click(1621, 896) pg.click(1621, 896) # time.sleep(1) pg.click(1693, 859) # time.sleep(1) pg.click(1014, 669) # time.sleep(1) pg.click(1111, 605) a = 20 time.sleep(10) while (a != 0): codehere() a = a - 1

You can run the script, open your notepad or WhatsApp and see the message sent.





21 views0 comments

Recent Posts

See All

Mobile | Secret Phone Codes

Our smartphones have become extensions of ourselves, facilitating much of our communication and storing troves of private data. If...

Encryption/Decryption Files

How to encrypt and decrypt files in Python When you need to encrypt text, it is important to understand the different options you have....

Comments


bottom of page