how to create a spam-bot with pyautogui python module

 Python is an interpreted, high-level and general-purpose programming language

using pyautogui

pyautogui library provides cross-platform support for managing mouse and keyboard operations through code to enable automation of tasks.

to install pyautogui you need python 2 or python 3 installed 

if  you meet the requirements above so lets start :-

head to the command prompt or terminal and type ;

pip install pyautogui



next you need a text editor or  ide in this case i am using visual studio code.

open your desired ide and :

input this code


import pyautogui
import time

comments = [“Hi”,”Just commenting for fun”,”Checking my python comment bot”,”Just for fun”,”I am just checking my python skill”,”python is awesome”,”I am a messy programmer”]

time.sleep(5)

for i in range(10):
    pyautogui.typewrite(comments[i%7])
    pyautogui.typewrite(“\n”)
    time.sleep(1)


 

if you have any difficulty please leave a question in the comment box

Comments