How to Make a Texting Bot in Python
by asepulv2 in Circuits > Computers
21 Views, 0 Favorites, 0 Comments
How to Make a Texting Bot in Python

I've created an auto-texting bot, this is a software program designed to automatically send text messages without human intervention. This bot can be integrated with messaging platforms to interact with users in real time, choosing what you want your message to be, you click run and it'll automatically type it out for you and send it out. I originally made this simple program because I had a message to send to multiple people and was too lazy to type it out and didn't want to do it over and over again.
Supplies
-Someone to Text
-A Computer
-Mouse
-Keyboard
-Pycharm
1. Install PyCharm, it's free and you just download it online

2. Once open, on the top left corner, and click “File”

3. Select “New Project” and then the “Create” box

- Once named, click on “File” again and select new, create a new python file

5. Click on “File” one more time and click on New again, but this time select File. After naming it select the text option

6. In the text file, type in what you want your message to be

7. Once you finish with that, return to the python file and import pydirectinput and time
-import pydirectinput, time

8. set a sleep timer so it gives you time to set up who you want to message
-time.sleep(5)

9. Set a variable to open and read the file
-f = open("filenamehere", 'r')

10. make a loop so it goes through the words in that variable
-for words in f:

11. Use pydirectinput to type the words in the file and click enter after
-pydirectinput.typewrite(words)
pydirectinput.press("enter")
12. To run this program, click the run button at the top right corner, open the message log, click on the text bar, and leave your mouse there. From there, it should auto-type and automatically send.