


To get the green circle, right-click on a contact and click mark as unread. Take a screenshot of the images marked with a red rectangle. Next, we have to take some snapshots to tell the program where it should drag the mouse to and where to click. The program will terminate when the mouse pointer touches the x-axis.

The above code will print the coordinates of the mouse pointer and the color it is hovering over. Add the following code : import pyautogui as pt This program will collect information about the color and position of certain elements on the screen. Read the context of WhatsApp GUI Extract Screen InformationĬreate a folder named whatsapp and inside it create a file gui_info.py. If you are using Ubuntu (Linux), you would have to additionally install the following packages : $ sudo apt-get install scrotġ. Open your terminal and type the following commands to install the packages: $ pip install opencv-python Process the message and programmatically reply to itīefore starting, we would need to install open-cv, pyautogui, and pyperclip.Programatically click on unread messages and extract the message.Remember in Silicon Valley, Gilfoyle created an automated reply bot for chatting with Dinesh! 😂 You can also have an AI (Artificial Intelligence) bot chatting with your friends you don’t want to be bothered by. I will be creating a python bot that will go through unread messages in WhatsApp and respond to them as per the response condition set.
