Pyautogui

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

webbrowser.open(‘www.youtube.com’)
print(‘waiting for 6 seconds for youtube to open’)
time.sleep(6)

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

print(‘typing’)
pyautogui.typewrite(‘afterowl python’)
time.sleep(3)

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

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

Sponsored Post Learn from the experts: Create a successful blog with our brand new courseThe WordPress.com Blog

WordPress.com is excited to announce our newest offering: a course just for beginning bloggers where you’ll learn everything you need to know about blogging from the most trusted experts in the industry. We have helped millions of blogs get up and running, we know what works, and we want you to to know everything we know. This course provides all the fundamental skills and inspiration you need to get your blog started, an interactive community forum, and content updated annually.

Batch Insert

Inserting millions of rows will take a tow on the transaction log. When you’re inserting this much data, your log file will quickly grow and will have potentials to crash your database. To help relieve the pressure of the log file, you’ll want to insert in batches (this is something that is done in SSIS).

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.

Alter Schema

Schema’s are use to help isolate users to a specific schema, ETL purposes, reusing a table name that already exists, and etc. reasons. In this video, I’ll show you how to import data into a table. Once the data is ready an Alter Schema is performed to prevent any downtime of the table.