I am completely new to scripting but experienced in all sorts of imaging. What I would like to do is write a script that tells SharpCap to take X number of frames every X number of minutes and continue this for X number of times or X number of total minutes.
I tried using ChatGBT and that didn't work. Probably because I don't know what I am doing or don't know how to run the script it generated. I put what ChatGBT wrote below.
In any case, I really could use a bit (actually a lot) of help. Thanks in advance.
Eric
---------------------------------
import SharpCap
import time
# Adjust these values as necessary
num_frames = 10
interval_minutes = 2
frame_delay_seconds = 5 # This value may need to be adjusted based on your setup
def capture_frames(num_frames):
for i in range(num_frames):
# Capture a single frame
SharpCap.SelectedCamera.RunCapture(1)
# Wait some time before capturing the next frame (if necessary)
time.sleep(frame_delay_seconds)
# Main loop
while True:
# Capture frames
capture_frames(num_frames)
# Wait for two minutes before capturing the next set of frames
time.sleep(interval_minutes * 60)