I want to launch SharpCap from the command line with a script.
Here is the command:
Code: Select all
C:/"Program Files/SharpCap 4.0 (64 bit)/SharpCap.exe" /runscript "c:\Data\RINGSS\python_code\SharpCap.py"
Code: Select all
import clr
clr.AddReference("SharpCap.Base")
clr.AddReference("SharpCap.Interfaces")
from System import AppDomain
clr.AddReference([t for t in AppDomain.CurrentDomain.GetAssemblies() if t.GetName().Name == "SharpCap.App"][0])
del AppDomain
SharpCap.SelectedCamera = SharpCap.Cameras[1]
SharpCap.SelectedCamera = SharpCap.Cameras[0]
SharpCap.SelectedCamera.GetControl(CommonPropertyIDs.Exposure).Value = 0.002
Code: Select all
IronPython 2.7.11 (2.7.11.1000)
[.NETFramework,Version=v4.5 on .NET Framework 4.8.4645.0 (64-bit)]
Type "help", "copyright", "credits" or "license" for more information.
>>>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Data\RINGSS\python_code\SharpCap.py", line 7, in <module>
ImportError: No module named Base
I am using SharCap Pro (v4.0.9538, 64 bit)
Thanks!
Christian