Importing SharpCap loses access to SharpCap application object (and a few other basic questions)
Posted: Fri Mar 01, 2024 5:54 pm
Hi,
I've noticed that "import SharpCap" (which I need to do in order to access things like tracking rate, etc) reassigns the SharpCap identifier to the module, whereas it previously referred to the Application object. I can do "SC = SharpCap" before this of course to save the Application object, but is there a way to refer to it after the SharpCap module has been imported? I see that it is of type SharpCap.Models.Application but there doesn't seem to be a way to get a handle to the active application from that class.
The related question is, is there a way to reinitialize the Python environment, or force a running script to use a new environment? If I've run the script once, "SharpCap" has been redirected to point to the module, then when I re-run the script during debugging, the line SC = SharpCap obviously no longer works correctly. That's why I'd rather set "SC" more directly instead of with the potentially ambiguous "SharpCap". I could just set a "FIRST_RUN" variable to know whether or not to set SC, but that seems like a kludge.
What are the different options for the MessageBoxButtons?
Is there a method construct a dialog box for the user to input values?
Is there a way to know which instance of SharpCap this is, if there are multiple instances running on the same machine?
Finally, is there a way to sound a beep, play an audio file, etc?
Thanks!
Patrick
I've noticed that "import SharpCap" (which I need to do in order to access things like tracking rate, etc) reassigns the SharpCap identifier to the module, whereas it previously referred to the Application object. I can do "SC = SharpCap" before this of course to save the Application object, but is there a way to refer to it after the SharpCap module has been imported? I see that it is of type SharpCap.Models.Application but there doesn't seem to be a way to get a handle to the active application from that class.
The related question is, is there a way to reinitialize the Python environment, or force a running script to use a new environment? If I've run the script once, "SharpCap" has been redirected to point to the module, then when I re-run the script during debugging, the line SC = SharpCap obviously no longer works correctly. That's why I'd rather set "SC" more directly instead of with the potentially ambiguous "SharpCap". I could just set a "FIRST_RUN" variable to know whether or not to set SC, but that seems like a kludge.
What are the different options for the MessageBoxButtons?
Is there a method construct a dialog box for the user to input values?
Is there a way to know which instance of SharpCap this is, if there are multiple instances running on the same machine?
Finally, is there a way to sound a beep, play an audio file, etc?
Thanks!
Patrick