As of DOpus 13, the Version object states the version as 13.x.x.0 for every version to date. I would prefer to trim the .0 as part of a Titlebar script.
I see there are a few threads discussing JScrpit trim, such as this one, as well as very little via a Google search that proved helpful.
Any way to get something like this to work or thoughts on a better way to do it?
var version = DOpus.version.product;
var shortversion = version.substr(version.length - 2);
Thanks in advance.
**CURRENT SYSTEM INFO**
Directory Opus: 13.2.2 Build 8816 x64
OS: Windows 10.0 Pro Build 19045
Hardware: Intel i7-1065G7 • 16GB RAM
DOpus.Output(DOpus.Version);
var s = DOpus.Version.product[0];
s = s + "." + DOpus.Version.product[1];
if (DOpus.Version.product[2])
s = s + "." + DOpus.Version.product[2];
if (DOpus.Version.product[3])
s = s + "." + DOpus.Version.product[3];
DOpus.Output(s);
var x = (''+DOpus.Version.product).slice(0,-2);
DOpus.output(x)
why ''+? DOpus.Version.product is a String-like object, outputs 13.x.y.z in DOpus.output() but it does not support toString() and must be converted to strng via ''+... for slice() to work.