Using pyautogui to automate your daily work or play a video game for you.

Copy the code below into a text file and run it in your Python IDE. You may need to install the three libraries first

pip install webbrowser

pip install time

pip install pyautogui

import webbrowser
import time
import pyautogui‘’)
print(‘waiting for 6 seconds for youtube to open’)

print(‘clicked search bar’)
step1 = pyautogui.locateOnScreen(“search bar.png”)

pyautogui.typewrite(‘afterowl python’)

print(‘clicking on search button’)
step2 = pyautogui.locateCenterOnScreen(“search button.png”)

print(‘clicking on Python Graph image’)
step3 = pyautogui.locateCenterOnScreen(“python graph.png”)

Create and Write to a File

If you need a quick way to log all of the current running processes to a text file you’ll want to check out this video. In this video, I’ll show you how to get all of the currently running processes in Task Manager/Activity Monitor and save that information to a text file. Python is small in size and allows the same code to run in both Windows and Mac which is great because you don’t need to recode for the specific OS.