Page 1 of 1
Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 7:33 am
by shawnblc
I'm basically try to determine if the system is OSX or Windows. Not getting what I'd expect with the following.
Pointers anyone?
Code: Select all
if fld "fldSystemVersion" contains "10" then put "OSX" into fld "fldOSTitle" else
put "Windows" into fld "fldOSTitle"
Re: Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 7:43 am
by sefrojones
shawnblc wrote:I'm basically try to determine if the system is OSX or Windows. Not getting what I'd expect with the following.
Pointers anyone?
Code: Select all
if fld "fldSystemVersion" contains "10" then put "OSX" into fld "fldOSTitle" else
put "WIndows" into fld "fldOSTitle"
What about something like this:
Code: Select all
if the platform is "macOS" then put "OSX" into fld "fldOSTitle" else
put "WIndows" into fld "fldOSTitle"
Re: Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 7:46 am
by shawnblc
What about something like this:
Code: Select all
if the platform is "macOS" then put "OSX" into fld "fldOSTitle" else
put "WIndows" into fld "fldOSTitle"
Doesn't work either, but I appreciate the assistance. Anyone else?
Re: Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 7:48 am
by Simon
What does
put systemversion()
in the message box return?
Simon
Re: Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 7:58 am
by sefrojones
This code seems to be working:
Code: Select all
if fld "fldsystemversion" contains "10" then
put "osx" into fld "fldOStitle"
else
put "windows" into fld "fldOStitle"
end if
at least on the windows side. I have tried with things like 10.10.0, and 10.1.5, etc int the fld "systemversion" and it seems to be working. I am testing on a windows system though.....
Re: Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 7:59 am
by shawnblc
Simon wrote:What does
put systemversion()
in the message box return?
Simon
Awesome Simon!
Thank you. Just tested on both OSX and Windows. Got what I was expecting. Thank you sir.
Re: Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 11:21 am
by Klaus
Hi Shawn,
yep "systemversion'()" is it
But please allow a short question:
In your examples HOW and WHERE did your field "fldsystemversion" get filledt?
Best
Klaus
Re: Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 2:17 pm
by shawnblc
Klaus wrote:Hi Shawn,
yep "systemversion'()" is it
But please allow a short question:
In your examples HOW and WHERE did your field "fldsystemversion" get filledt?
Best
Klaus
I have the following to fill the fld "fldSystemVersion"
Code: Select all
put the systemVersion into fld "fldSystemVersion"
Re: Not getting what I'd expect. Please check my code.
Posted: Fri May 23, 2014 2:27 pm
by Klaus
Thanks!
And what exactly is the difference from using "the systemversion" directly?
