Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Python/Send_Whatsapp_msgs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#Before Running, Please do
#pip install webbrowser
#pip install pyautogui

import webbrowser as web
import pyautogui as pyta
import time
lel=input('Is Your Qr Code Scanned on ur default Browser? {Y/N}')
if lel=='Y':
print("in 10 seconds, Please scan the qr code visible on your screen with whatsapp scanner")
time.sleep(10)
web.open("https://web.whatsapp.com")
print("cool")
else:
contact=input("Enter the Contact you want to send a message to:(please insert country code too")
message=input("Enter the Message You wanna pass on")


def send_msg(number,message):
print("Contact=",contact,"\n","and Message =",message,"would be sent in 20 seconds")
time.sleep(10)
web.open('https://web.whatsapp.com/send?phone=%27+{}+%27&text='.format(number))
time.sleep(20)
pyta.write(message)
pyta.press('enter')

send_msg(contact,message)