Send WhatsApp Messages Using Python with Source Code

Want to automatically send WhatsApp messages using Python? The pyautogui library makes it easy! you can Automatically message your friends using Python and the pyautogui library.
What is pyautogui ?
The pyautogui library is a powerful tool for automating mouse and keyboard interactions with other applications. Using Python scripts, you can easily control the movement of the mouse and keyboard to interact with other programs and systems. The pyautogui library provides many features that make this process easier, such as the ability to click and drag or scroll through lists using keyboard commands. A few examples of how you can use the pyautogui library are given below.
Note : after running the program immediately open whatsapp web then open the persons chat you want to send messages
Source Code :
Get Discount on Top Educational Courses
# Importing the required module
import pyautogui as pg
import time
# Giving Dealy to run program
print("program will run after 5 second")
time.sleep(5)
print("running")
# Note : after running the program immediately open whatsapp web then open the persons chat you want to send messages
# For loop
for i in range(100):
# writing the messages
pg.write("I love you")
time.sleep(0.5)
# Seding the messages by pressing enter
pg.press("Enter")
Output :

Find More Projects
MathGenius Pro – AI-Powered Math Solver Using Python Introduction: From simple arithmetic to more complicated college-level subjects like integration, differentiation, algebra, matrices, …
CipherMaze: The Ultimate Code Cracking Quest Game Using Python Introduction: You can make CipherMaze, a fun and brain-boosting puzzle game, with Python …
Warp Perspective Using Open CV Python Introduction: In this article, we are going to see how to Create a Warp Perspective System …
Custom AI Story Generator With Emotion Control Using Python Introduction: With the help of this AI-powered story generator, users can compose stories …
AI Powered PDF Summarizer Using Python Introduction: AI-Powered PDF Summarizer is a tool that extracts and summarizes research papers from ArXiv PDFs using Ollama (Gemma 3 LLM). The …
AI Based Career Path Recommender Using Python Introduction: One of the most significant and frequently perplexing decisions in a person’s life is …