Search found 63 matches
- Thu Aug 30, 2018 10:26 am
- Forum: Scripting
- Topic: Check if Wheel is Connected
- Replies: 3
- Views: 2180
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...
- Thu Aug 30, 2018 9:58 am
- Forum: Scripting
- Topic: Reading SharpCap version number
- Replies: 3
- Views: 2239
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 chan...
- Thu Aug 30, 2018 8:22 am
- Forum: Scripting
- Topic: Check if Wheel is Connected
- Replies: 3
- Views: 2180
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 WH...
- Tue Aug 28, 2018 7:13 am
- Forum: Scripting
- Topic: Reading SharpCap version number
- Replies: 3
- Views: 2239
Re: Reading SharpCap version number
Thanks Robin, just need it to put a condition in my script for pre & post v3.2admin wrote: ↑Tue Aug 28, 2018 6:50 am A bit hacky, but
does the trick.Code: Select all
SharpCap.GetType().Assembly.GetName().Version.ToString()
cheers,
Robin
Cheers
Kirk
- Tue Aug 28, 2018 1:56 am
- Forum: Scripting
- Topic: Reading SharpCap version number
- Replies: 3
- Views: 2239
Reading SharpCap version number
Is there anyway to read SharpCap’s version number via scripting?
Cheers
Kirk
Cheers
Kirk
- Mon Aug 27, 2018 8:53 pm
- Forum: Scripting
- Topic: Can Anyone See The Bug Here?
- Replies: 5
- Views: 2783
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...
- Mon Aug 27, 2018 5:34 pm
- Forum: Scripting
- Topic: Can Anyone See The Bug Here?
- Replies: 5
- Views: 2783
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...
- Sat Aug 25, 2018 9:04 am
- Forum: Scripting
- Topic: CaptureLimitValue now missing
- Replies: 9
- Views: 3889
Re: CaptureLimitValue now missing
I've found an answer to my TimeSpan question: https://docs.microsoft.com/en-us/dotnet ... work-4.7.2
- Sat Aug 25, 2018 8:16 am
- Forum: Scripting
- Topic: CaptureLimitValue now missing
- Replies: 9
- Views: 3889
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...
- Fri Aug 24, 2018 11:11 pm
- Forum: Scripting
- Topic: Can Anyone See The Bug Here?
- Replies: 5
- Views: 2783
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...