No module named Base
Posted: Thu Jul 27, 2023 6:52 pm
Sorry for this basic question (new to SharpCap!) I must be missing something very basic...
I want to launch SharpCap from the command line with a script.
Here is the command:
The script is:
Program is launched, the script is used but fails with this message (in the IronPython Console)
The last three lines of code in the script work well from the code snippets area of the Console...
I am using SharCap Pro (v4.0.9538, 64 bit)
Thanks!
Christian
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.002Code: 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