-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathautoComment.py
41 lines (28 loc) · 1.2 KB
/
autoComment.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
***Sending Automated messages or Comments****
Warning: DO NOT USE THIS FOR VIOLATION
I will NOt hold responsibilites if something wrong is done using this code
"""
"""
by: Ashraf Minhaj
mail: ashraf_minhaj@yahoo.com
blog: http://ashrafminhajfb.blogspot.com
python version: python3.7.1
"""
import pyautogui
from time import sleep
from random import randint
x = 50 #how many messages or comments you want to send
def name():
"""generates random names"""
nameList = ["Baby", "Shona", "Honey", "Jaan", "Wifey"] #list of names (change according to your requirement)
rand_name = nameList[randint(0, len(nameList) - 1)] #traverse names randomly for n, from 0 to (n-1)
return rand_name #return the random name it just generated
while True: #forever loop
pyautogui.typewrite(f"I love you {name()}") #type message
sleep(.600) #A bit delay of 600 ms
pyautogui.typewrite("\n") #New line, here 'Enter' to send text
sleep(2) #delay of 2 seconds
x = x - 1 #decrement x value by 1
if x == 0:
break #get out of the loop and finish