Hello Robin,
Here a simple question ... how to pause and resume a film from a script ?
Regards,
Jean-Francois
Pause and Resume from a script
-
- Posts: 417
- Joined: Sun Oct 13, 2019 10:52 am
- Location: Germany
- admin
- Site Admin
- Posts: 13520
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Pause and Resume from a script
Hi Jean-Francois,
if you want to pause/resume video capture then I think you just need to do
If you want SharpCap to take control of your DVD player then it might be a bit harder
cheers,
Robin
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
cheers,
Robin
-
- Posts: 417
- Joined: Sun Oct 13, 2019 10:52 am
- Location: Germany
Re: Pause and Resume from a script
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
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
- admin
- Site Admin
- Posts: 13520
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Pause and Resume from a script
Actually the second line in the code snippet above was meant to be
sorry for the error.
cheers,
Robin
Code: Select all
SharpCap.SelectedCamera.Paused = False
cheers,
Robin
-
- Posts: 417
- Joined: Sun Oct 13, 2019 10:52 am
- Location: Germany
Re: Pause and Resume from a script
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 ...
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
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)
Here only the "open" command. My DVD has no motor for opening and closing, so only the spring-opening works.
Regards,
Jean-Francois