Joining your online class with automation

I wanted to find a way to open and join my online classrooms automatically. I will describe how to do this using Python and Windows Task Scheduler.

We need a way to open an internet browser and navigate to a particular URL. The Python module webbrowser will do this. Create a new Python file with the code below and save it to your desktop. Be sure to change the url variable with the URL of your classroom.

import webbrowser
url = 'URL HERE'
webbrowser.open(url, new=2)

Okay, we have a .py file and now we need to create a batch file to run our file in cmd.exe. In the batch file, we need the Python path and the path of the .py file. Open Notepad and type both of those paths in separate quotes on the same line.

"C:\PATH_TO_PYTHON\python.exe" "C:\PATH_TO_FILE\AutoOpen.py"

Save this file anywhere you’d like as “AutoOpen.bat”.

So once we have the batch file create, we need to schedule a task to run the batch file at a certain time. In the Start Menu, type “Task Scheduler” and a window will pop up. Click on Create Basic Task… and follow the images below. Name the task, choose when the task should be run, and choose the file to run.

After the wizard completes, the task should be ready to go. You can right click on the new task and click Run to test it.

Unfortunately, this will only work for websites. If you join classes using a desktop program (Zoom, Cisco WebEx, etc.), this method will not work. Next time, I will attempt to use PyAutoGUI to solve this problem.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: