In this article, we will learn how to install pyautogui and we will spam WhatsApp messages using Python
So first of all, we have to install pyautogui on our PC so for that write the following command in your terminal
>>> pip install pyautogui
After installation, download the particular file called animal.txt from the following link Open Link after downloading the file put the file into the same folder for a better coding experience
After installation, make a .py file on your PC
Start Writing the Python code
Import sleep from the time module and pytautogui as pg
write the following code in your .py file
from time import sleep
import pyautogui as pg
sleep(10)
#full path of the animal .txt file
txt= open('E:\Collage Work\Programming\Python/animals.txt', 'r')
a = '(Your firend Name) is a '
for i in txt:
sleep(1)
pg.write(a+i)
#to press enter button
pg.press('Enter')
Thanks for reading the article, comment to suggest any improvement in my articles because I am still learning.
Thanks for sharing this information
ReplyDeletePython Online Training
Python Online Training in Hyderabad