Is there anyway to read SharpCap’s version number via scripting?
Cheers
Kirk
Reading SharpCap version number
- admin
- Site Admin
- Posts: 13296
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Reading SharpCap version number
A bit hacky, but
does the trick.
cheers,
Robin
Code: Select all
SharpCap.GetType().Assembly.GetName().Version.ToString()
cheers,
Robin
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
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: viewtopic.php?f=14&t=1055
There are two options that I am considering and these could also be used for any future changes, each with a draw back:
OPTION 1:
here I need to keep an eye on the changing future versions & alter the slice point if the Major build becomes more than a single digit as well as changing the figure after the operator.
OPTION 2:
this option is not reliant on changes to the Major build but I would still need to alter the figure after the operator.
Just putting this up in case anyone else needs the info.
Regards..,
Kirk
purely to let my script function with SharpCap pre & post v3.2 where the the property 'CaptureLimitValue' has been superseded in v3.2, see: viewtopic.php?f=14&t=1055
There are two options that I am considering and these could also be used for any future changes, each with a draw back:
OPTION 1:
here I need to keep an eye on the changing future versions & alter the slice point if the Major build becomes more than a single digit as well as changing the figure after the operator.
Code: Select all
if float(SharpCap.GetType().Assembly.GetName().Version.ToString()[:3]) < 3.2:
SharpCap.ShowNotification('Below v3.2')
else:
SharpCap.ShowNotification('v3.2 & Above')
OPTION 2:
this option is not reliant on changes to the Major build but I would still need to alter the figure after the operator.
Code: Select all
if float(SharpCap.GetType().Assembly.GetName().Version.Major.ToString() + '.' + SharpCap.GetType().Assembly.GetName().Version.Minor.ToString()) < 3.2:
SharpCap.ShowNotification('Below v3.2')
else:
SharpCap.ShowNotification('v3.2 & Above')
Regards..,
Kirk