Page 1 of 1
Pause and Resume from a script
Posted: Wed Jun 15, 2022 7:55 pm
by Jean-Francois
Hello Robin,
Here a simple question ... how to pause and resume a film from a script ?
Regards,
Jean-Francois
Re: Pause and Resume from a script
Posted: Wed Jun 15, 2022 8:02 pm
by admin
Hi Jean-Francois,
if you want to pause/resume video capture then I think you just need to do
Code: Select all
SharpCap.SelectedCamera.Paused = True
...
SharpCap.SelectedCamera.Pause = False
If you want SharpCap to take control of your DVD player then it might be a bit harder
cheers,
Robin
Re: Pause and Resume from a script
Posted: Wed Jun 15, 2022 9:45 pm
by Jean-Francois
Hello Robin,
OK, thanks.
I saw the "Paused" function ... but not found the "Resume".
Now it is clear ... I will try tomorrow to write something for the focus of my Sol'Ex spectrometer.
Good night,
Jean-Francois
Re: Pause and Resume from a script
Posted: Thu Jun 16, 2022 1:19 pm
by admin
Actually the second line in the code snippet above was meant to be
Code: Select all
SharpCap.SelectedCamera.Paused = False
sorry for the error.
cheers,
Robin
Re: Pause and Resume from a script
Posted: Thu Jun 16, 2022 6:22 pm
by Jean-Francois
Hello Robin,
Yes, I see the missing "d" ... no problem.
I test it with the simulation camera ... it work fine.
Concerning the "control" of the DVD player ... after a quick search, it exist several projects that takes the control of the CD/DVD.
Here without installing something ... I test with my extern USB3 Blu-Ray burner direct from the script console ...
Code: Select all
import ctypes
# play the CD
ctypes.windll.winmm.mciSendStringW("play cdaudio from 1 to 10000", None, 0, None)
# open the CD tray door
ctypes.windll.winmm.mciSendStringW("set cdaudio door open", None, 0, None)
The play command works .... Eh!, I can listen my old CDs now from outside
Here only the "open" command. My DVD has no motor for opening and closing, so only the spring-opening works.
Regards,
Jean-Francois