Skip to main content

Python boto3 send_message

 Automated message 

PyAutoGUI is a Python automation library used to click, drag, scroll, move, etc. It can be used to click at an exact position.

PyAutoGUI module ,Python scripts control the mouse and keyboard to automate interactions with other applications. The API is designed to be as simple. PyAutoGUI works on Windows, macOS, and Linux, and runs on Python 2 and 3.

 

This code is used to create the automated message in WhatsApp, iMessage, telegram and other social media.

 Preview :





Requirements:  text editor such as Python IDLE. In my case I’m using Pycharm {In mobile you can use Pydroid 3}




Modules: PyautoGUI.


Import the relevant module {pyautogui}. This pyautogui is pre-installed  python library that enables the users to create automations and mouse, keyboard controls.

Features: 

  • Sending keystrokes to applications (for example, to fill out forms).
  • Take screenshots, and it is saved as .png or .jpeg extension.
  • Locate an application’s window, and move, resize, maximize, minimize, or close it (Windows-only, currently)
  • Display message boxes for user interaction while your GUI automation script runs.{ as like cross-site scripting “alert messages”}
  • Moving the mouse and clicking or typing in the windows of other applications.


 To install pyautogui module: pip install pyautogui


    • On windows : py -m pip install pyautogui
    • On Mac OS : python3 -m pip install pyautogui
    • On linux OS : python3 -m pip install pyautogui


Let’s open the Pycharm and create new project and start our automated message program.


First we importing the relevant module namely pyautogui, time modules.

Creating the one .txt file for the message containing some texts or messages.

hai im srilaki_varma
this is the automated message send to the people in whatsapp,and other messangers
im using this with the help of the python
im using the pyautogui module
in this project we creating spam message also.

Create the main function of python(main.py).

Now we setting the time sleep for 10 seconds.

Creating the variable named text used to read and store the message.txt file which we created before in main.py.

Now make the for loop with some pyautogui functions like typewrite, press.


import time
import pyautogui
time.sleep(8)
text = open("message.txt", 'r')
for each in text:
pyautogui.typewrite(each)
pyautogui.press("enter")

output:





Frequent automated messages:

Let’s we  make the code more fun with while loop.

It will send the message frequently until the code is terminated.

import time
import pyautogui
time.sleep(8)
while True:
text = open("message.txt", 'r')
for each in text:
pyautogui.typewrite(each)
pyautogui.press("enter")

output:



Creating the spam message:

Lets make the variable text with user input as “do you want send message yes/no:”

And make another two variables t and n which contains yes and no commands.

If the command yes is given by the user the message is send to the person using pyautogui.

# importing the module

import pyautogui
import time
text=input("DO you want send message yes/no:")
t="yes"
n="no"
#time.sleep(10)
if (text==t!=n):
pyautogui.typewrite(" 🍎Take food πŸ₯— ")
pyautogui.press("enter")
time.sleep(10)

pyautogui.typewrite(" Take medicine ")
pyautogui.press("enter")
time.sleep(10)

pyautogui.typewrite(" Take rest ")
pyautogui.press("enter")
time.sleep(10)

pyautogui.typewrite(" Good night ")
pyautogui.press("enter")
time.sleep(10)

else:
print("unconditional error")

output:



 click for ->source code



Comments

Popular posts from this blog

PYTHON TUTRLE

  LEARN WITH FUN@FUTURE_CODE    😘 ONLINE PROPOSAL 😍 Python  uses an interpreter to translate and run its code and that’s why it’s called a scripting language.   A  python script normally can be full of functions that can be be imported as a library of function in other scripts. This python code will help you to propose your girlfriend/boyfriend. we are going to draw the rose flower 🌹 with text to propose someone πŸ’– PREVIEW:    Requirements: Text editor such as Python IDLE (pycharm). Install the python text editor such as pycharm  use this source code given below. Import the turtle module. This  turtle module  is a pre-installed python library that enables users to create pictures and shapes by providing them with a virtual canvas.                     To install turtle module : pip install turtle   Let's we import the turtle module as t. Then we create a ...

Arduino projects

  I love you 8x8 matrix display MAX7219 Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. The Wiring and Arduino both use C/C++ as programming languages and Arduino uses a simplified version. Processing used Java as a programming language but served as the basis for Wiring, which was the basis for Arduino. In this tutorial we are creating the led display in 8x8 matrix MAX7219 module. Preview : Components required: Arduino UNO board LED matrix MAX7219 Jumper wires Diagram: In proteus schematic diagram: First we need Arduino IDLE for creating the led matrix display program. Download the Arduino IDLE from the given below link Arduino IDLE download link:  https://www.arduino.cc/en/software Then we need to dow...