Search found 63 matches

by 1CM69
Thu Aug 30, 2018 10:26 am
Forum: Scripting
Topic: Check if Wheel is Connected
Replies: 3
Views: 781

Re: Check if Wheel is Connected

small update. Here I am checking to see if either the Camera or Wheel or both are not connected: if all([SharpCap.Wheels.SelectedWheel.Connected, SharpCap.SelectedCamera]): SharpCap.ShowNotification('BOTH CONNECTED') else: SharpCap.ShowNotification('ONE or BOTH DEVICES NOT CONNECTED') same applies a...
by 1CM69
Thu Aug 30, 2018 9:58 am
Forum: Scripting
Topic: Reading SharpCap version number
Replies: 3
Views: 808

Re: Reading SharpCap version number

Hi, purely to let my script function with SharpCap pre & post v3.2 where the the property 'CaptureLimitValue' has been superseded in v3.2, see: https://forums.sharpcap.co.uk/viewtopic.php?f=14&t=1055 There are two options that I am considering and these could also be used for any future changes, eac...
by 1CM69
Thu Aug 30, 2018 8:22 am
Forum: Scripting
Topic: Check if Wheel is Connected
Replies: 3
Views: 781

Check if Wheel is Connected

Hi, just trying out a simple piece of script to check if a Filter Wheel is connected but hit a small bump in the road. import clr clr.AddReference("SharpCap") if SharpCap.Wheels.SelectedWheel.Connected != False: SharpCap.ShowNotification('HAVE WHEEL') else: SharpCap.ShowNotification('NO WHEEL') the ...
by 1CM69
Tue Aug 28, 2018 7:13 am
Forum: Scripting
Topic: Reading SharpCap version number
Replies: 3
Views: 808

Re: Reading SharpCap version number

admin wrote:
Tue Aug 28, 2018 6:50 am
A bit hacky, but

Code: Select all

SharpCap.GetType().Assembly.GetName().Version.ToString()
does the trick.

cheers,

Robin
Thanks Robin, just need it to put a condition in my script for pre & post v3.2

Cheers

Kirk
by 1CM69
Tue Aug 28, 2018 1:56 am
Forum: Scripting
Topic: Reading SharpCap version number
Replies: 3
Views: 808

Reading SharpCap version number

Is there anyway to read SharpCap’s version number via scripting?

Cheers

Kirk
by 1CM69
Mon Aug 27, 2018 8:53 pm
Forum: Scripting
Topic: Can Anyone See The Bug Here?
Replies: 5
Views: 982

Re: Can Anyone See The Bug Here?

Kirk, I can't say if this will fix your problem but if you go back to one of your original posts where I attached my Python code: https://forums.sharpcap.co.uk/viewtopic.php?f=14&t=1029 You will see that I spawn a worker thread for operations that take a long time to execute. In GUI programming you...
by 1CM69
Mon Aug 27, 2018 5:34 pm
Forum: Scripting
Topic: Can Anyone See The Bug Here?
Replies: 5
Views: 982

Re: Can Anyone See The Bug Here?

Well I am stumped... :? I definitely thought that it was down to indents causing the issue but I have seemingly tried every combination under the sun with no joy. The script works perfectly as a bare script with no GUI but as soon as I wrap the code inside a Button Click it hangs. By trial and error...
by 1CM69
Sat Aug 25, 2018 9:04 am
Forum: Scripting
Topic: CaptureLimitValue now missing
Replies: 9
Views: 1513

Re: CaptureLimitValue now missing

I've found an answer to my TimeSpan question: https://docs.microsoft.com/en-us/dotnet ... work-4.7.2
by 1CM69
Sat Aug 25, 2018 8:16 am
Forum: Scripting
Topic: CaptureLimitValue now missing
Replies: 9
Views: 1513

Re: CaptureLimitValue now missing

Hi Kirk, this is a change in 3.2 - previously CaptureLimitValue was used for both number of frames and times. Now there are two separate values to set CaptureLimitCount (for number of frames, an integer) CaptureLimitTime (for setting the time length of a capture - this is a TimeSpan) from System im...
by 1CM69
Fri Aug 24, 2018 11:11 pm
Forum: Scripting
Topic: Can Anyone See The Bug Here?
Replies: 5
Views: 982

Re: Can Anyone See The Bug Here?

while True: if not SharpCap.SelectedCamera.Capturing : break time.sleep(0.5) If you ask me, that 'time.sleep' should be inside the while-loop. The way you have it written that while-loop is bogarting the CPU. By putting the 'time.sleep' inside the while-loop you are giving the capture time to execu...