Python Automation Simple Script?

Hi Folks,

I’m a complete newbie to programming and Python. I’m looking to learn Python initially (its installed on my PC along with Visual Studio Code) to automate some simple tasks in Windows 10. For example, I want to create a Python program to go to a website at a particular time, open Zoom, login to the meeting, mute and turn video off, open OBS Studio, record for 60 minutes, stop recording and end. I went to ChatGPT to see if it could generate a Python script for me. This is what it came up with:

import webbrowser
import subprocess
import time

# Replace the URL with the URL of your Zoom meeting
url = ""

# Wait until 17:30 AM
current_time = time.localtime()
while current_time.tm_hour != 17 or current_time.tm_min != 30:
    time.sleep(60) # Sleep for 1 minute
    current_time = time.localtime()

# Open the Zoom meeting URL in your default web browser
webbrowser.open(url)

# Start recording with OBS Studio
subprocess.run(["obs", "--startrecording"])

# Wait for 1 hour (3600 seconds)
time.sleep(3600)

# Stop recording with OBS Studio
subprocess.run(["obs", "--stoprecording"])

Needless to say, it didn’t work. Could someone here please kindly point me in the right direction on how to create the correct Python code? Thanks in advance for any and all help provided.

Cheers!

Roger

Start with our Python curriculum. Or since you are totally new, start with the JavaScript curriculum.

Thanks for your quick reply. Should I then take the " JavaScript Algorithms and Data Structures" course at the freecodecamp website?

If you are new to programming, that is a good place to start. You do not have to complete all of it, but it will give you the basics and an intro to the kind of thinking you need to do to be able to program. Once you get past the Basic Algorithms section, then you could check out the Python curriculum and go from there.

Thanks again for your reply. I’ll definitely look into this.