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.