I want to send auto message using pywhatkit. It is done by this code :
import pywhatkit
pywhatkit.sendwhatmsg("+92xxxxxxxxxx", "Hello ", 22, 28)
print("Successfully Sent!")
I have followed this link : https://www.geeksforgeeks.org/introduction-to-pywhatkit-module/
I just want to ask is there any way to auto-close the tab after sending an auto message? Thanks.
If you just want to close the google chrome tab, you can simulate pressing Ctrl+W
to close it.
you can use keyboard
library - pip install keyboard
in cmd, then:
import keyboard
keyboard.press_and_release('ctrl+w')