I know the basics of coding in c#, but am rather new to python.
I would like to initate exposures in SharpCap from an external program, for example Win Explorer (or cmd, batch or another C#-program).
I have a python script snippet, that basically does what I want, but it's working only when executed inside SharpCap's console:
Code: Select all
indx="0001"
SharpCap.SelectedCamera=SharpCap.Cameras.Find(lambda x:x.DeviceName=="Test Camera 1 (Deep Sky)")
SharpCap.SelectedCamera.CaptureSingleFrameTo("d:\\SCTests\\sh216_240225_"+ indx +".fits")
"NameError: name 'SharpCap' is not defined".
(Python 3.11.8 is installed).
Do I have to load a module or s.th. similiar and how to do this?
Matt