Discussions on extending SharpCap using the built in Python scripting functionality
Ozo_N
Posts: 3
Joined: Mon Apr 08, 2019 8:01 am

Hi !

I am trying to interface sharpcap 3.2 with an external python script , so I need to import a "Sharpcap.Base.dll" and a "SharpCap.App.dll" files to run my script, as suggested by the help in the internal IronPython console, but I don't find theme in the sharpcap directory.
Where could I find the proper files ?
I haven't bought the pro license yet, is it correlated ?

Many thanks

Posts: 2861
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Hi,

Those two files are no longer included as part of the SharpCap installation. Please can you explain a bit more detail what you are trying to do and I will see if there is an alternative for you.

Those files will not magically appear if you buy the Pro version!

Cheers, Robin

Ozo_N
Posts: 3
Joined: Mon Apr 08, 2019 8:01 am

Ok.
I have written a python script in which I import specific librairies and packages to run other devices, and I would like to add some other functionnalities to control a camera thanks to SharpCap . So I can't run such a script via the internal python console of SharpCap due to dependance of external elements.

Is it possible to add/import something else at the begining of my python script, allowing to call/communicate with sharpcap functionalities from an external console ?

Posts: 2861
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Hi,

Yes, there has been some experimentation with using a Python package called 'Pyro' inside SharpCap as a remoting server that means that SharpCap functionality can be invoked from other Python scripts running in a separate process. I think you will find some mentions of it in this scripting forum.

Even that might be a bit overkill for this situation – you could always start a TCP server on a port from the Python within SharpCap and then connect to that externally. All you need to do then is read messages from the port and have some sort of protocol that you can design yourself for the actions you want to take.

Cheers, Robin

Ozo_N
Posts: 3
Joined: Mon Apr 08, 2019 8:01 am

Hi Robin !
Thank you so much for your help !
I get my external code communicating with an internal script running from the SharpCap python console with "Pyro".

However, as far as I know, I still need to run the internal script manually in the SharpCap console, is there a way to run it remotly ? It's not critical but would help a lot.

Best

Posts: 2861
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

 SharpCap/runscript "c:\full\path\to\script.py"