Skip to main content

Command Palette

Search for a command to run...

Weekend#3-project-4: Auto Messaging Bot Using Python

Published
2 min read
Weekend#3-project-4: Auto Messaging Bot Using Python
.

Aspiring Data Science Engineer | CSE Final Year student| Python GenAI Enthusiast | Building & Blogging my journey

Today I built a playful Python bot that automatically types messages, of course for demonstration purposes! . Automation is one of the most powerful tools at a developer’s disposal. The Message Automator App is a lightweight Python project designed to demonstrate the practical application of automation using PyAutoGUI

NOTE !!

: IThis isn’t a professional tool, just a fun spammy-cute bot I made for laughs.. Think of it as a cute (but slightly annoying) bot that can type out whatever messages you feed it, one after another, with perfect robotic patience.

AUTO MESSAGING BOT

WATCH 📽️📽️

WHAT I PRACTICED 🎉:

  • Loops ( while True )

  • Libraries ( pyautogui, time, datetime )

  • Console logging

  • Customizing output messages

  • Time delays ( time.sleep )

WHAT’S NEW 👀:

  • Using pyautogui.typewrite() to simulate typing

  • Automating repetitive tasks

  • Printing timestamps using datetime.datetime.now()

EXPLANATION:

STEP 1: SET UP AND LIBRARIES

import pyautogui, time, datetime
  • pyautogui : Automates keyboard typing.

  • time : Controls delays between messages.

  • datetime : Prints timestamps when messages are sent.

STEP 2: LOOPING:

while True:
  • while True : Repeats the message sequence continuously until stopped.

  • You can break the loop whenever you want by adding ‘break’ if you want.

STEP 3: MESSAGE INPUT LOGIC


    print(datetime.datetime.now())
    pyautogui.typewrite("Peek-a-boo! I see you 👁️") 
    pyautogui.press("enter")
    time.sleep(5)
  • typewrite(): Types the message.
  • press(“enter”) : Hits enter to send.

  • time.sleep(5) : Waits 5 seconds before the next message. you can give any value here.

EXTRA :

  • Customize your messages

  • Use emojis

  • You can speed up or slow down .

Conclusion:

The Message Automator App is a simple yet fun Python project for automation demos. You can use it to:

  • Demonstrate Python skills

  • Learn practical automation with PyAutoGUI

I have provided the GitHub link below. You can also modify the code more creatively and freely to your liking:

AUTOMATED-MESSAGING-BOT

references :

Spam bot using PyAutoGUI by CODEDEX

Feel free to contact me if you have any doubts or suggestions . print(“😊😉.”)