Quick Windows 11 test...

matthias_livecode_150811 at m-r-d.de matthias_livecode_150811 at m-r-d.de
Wed Apr 13 14:26:09 EDT 2022


This here would

return the macOS version and would return Windows 10 on version 10 and Windows 11 on version 11
If you also need this for other Windows version you have to extend it a little bit


switch the platform
case "Win32"
put shell("ver") into tVersion
set the itemdelimiter to "."
if item 3 of tVersion >22000
then
return "Windows 11"
else 
return "Windows 10"
end if
break
case "MacOS"
  get shell("sw_vers -productVersion")
  return it
break
end switch	




> Am 13.04.2022 um 20:05 schrieb matthias rebbe via use-livecode <use-livecode at lists.runrev.com>:
> 
> Ups,
> 
> not 'version' but 'ver' returns 10.0.xxxxxx.x.
> In my case 10.0.22581.100
> 
> 
> Any value above 22000 is Windows 11, any value below of 22000 is Windows 10.
> 
> 
>> Am 13.04.2022 um 20:01 schrieb matthias_livecode_150811 at m-r-d.de:
>> 
>> Unfortunately Windows 11  shell command 'version" returns NT 10.0.
>> That's the same value as Windows 10 returns.
>> 
>> 
>> 
>> 
>> 
>>> Am 13.04.2022 um 19:40 schrieb Paul Dupuis via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
>>> 
>>> On 4/13/2022 11:19 AM, panagiotis m via use-livecode wrote:
>>>> Hello all,
>>>> 
>>>> The function systemversion() returns 10.16.0 on MacOS Big Sur and above.
>>>> This is something we should fix.
>>>> 
>>>> As a workaround, until this is fixed, you can use this to get the system
>>>> version on MacOS:
>>>> 
>>>> function mySystemVersion
>>>>   get shell("sw_vers -productVersion")
>>>>   return it
>>>> end mySystemVersion
>>>> 
>>>> Cheers,
>>>> Panos
>>>> --
>>>> 
>>> Panos (or any other LC staffer?)
>>> 
>>> Do you have a companion work-around for Window 11 which where systemVersion() reports "NT 10.0"?
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list