Git Product home page Git Product logo

whatsappchatbot's Introduction

WhatsApp Chat Bot ยฉ Tridib Samanta

WhatsApp Web Automation using Python ๐Ÿ

***** FOLLOW THE INSTRUCTIONS *****

โ— Check whether python is installed in the system Open the cmd and write : python -V

โ— Check whether pip is installed in the system In cmd type : pip -V

โ— Open python IDLE and write the following statement : import pyautogui as p If import is not successful, install the pyautogui library using the command- pip install pyautogui, in cmd.

โ— Open WhatsApp Web (https://web.whatsapp.com) and place the mouse cursor on the "Search" box, now dont move the mouse cursor from there and open the IDLE. Don't use the mouse, use Alt+Tab to open IDLE.

โ— Now write the following statement : p.position() Sample output will be like - Point(x=190,y=150)

โ— Open the WhatsAppChatBot.py in an editor and edit the line 38 p.click(put the value of x,put the value of y)

โ— Now open WhatsApp Web, and open a chat which has a last message sent by receiver, move the mouse cursor the top of the last message and then place the cursor there and take the position of the cursor in the same way as explained above in IDLE.

โ— Put the values of x and y in line no. 44

โ— Now move the cursor to the position where the message ends and navigate to the IDLE and take the position of the cursor using p.position() statement.

โ— Now substract the values of x and y in line no. 44 from the newly obtained x and y values in the previous step.

โ— Put the resultant x and y values obtained after substraction in line 45 p.dragRel(Substracted x value, Substracted y value, 0.5)

โ— I have used the pyttsx3, the Text-to-speech library which will even send a recorded voice message as specfied in the code.

โ— Go to WhatsApp Web, place the mouse cursor on the microphone icon beside type a message box, and in the same way as mentioned above get the position of the mouse cursor the in the IDLE.

โ— Put the obtained value of x and y in line 136 and line 139. This turns on the recording, meanwhile the text is read and then sends the recording to the receiver.

โ— In line 39, type the name of the receiver in the p.typewrite("Name of receiver here\n") statement.

โ— I have added a few basic questions, keep on adding more. There's a lots to improve here, keep thinking and suggest edits. Happy developing and keep codes open source and help others to learn.

MADE WITH ๐Ÿ’™ BY TRIDIB SAMANTA

whatsappchatbot's People

Contributors

tridibsamanta avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.