top of page

Mouse & Keyboard Bot

Mar 1, 2023
1 min read

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.





Recent Posts

See All
Hiding Messages Inside an Emoji

Imagine receiving a message that contains nothing more than this: 🌊‌‌‌‌‌‌‌‌‌‍‌‍‍‌‍‍​‌‌‌‌‌‌‌‌‌‍‌‍‌‌‍‍​‌‌‌‌‌‌‌‌‌‍‌‍‌‍‌‌​‌‌‌‌‌‌‌‌‌‍‌‌‌‍‌‍​‌‌‌‌‌‌‌‌‌‍‌‌‍‍‍‌​‌‌‌‌‌‌‌‌‌‍‌‌‌‍‍‍​‌‌‌‌‌‌‌‌‌‍‌‌‌‍‌‍​‌‌‌‌‌‌‌‌‌‌‍‌‍

 
 
 
Fake Data in Python

If you are developing applications, testing your software, or just exploring Python's capabilities, you might have faced a situation...

 
 
 
Mobile | Secret Phone Codes

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

 
 
 

Comments


STENGE.info | Built with curiosity. Secured by knowledge.

bottom of page