Re: OS version?
Re: OS version?
- Subject: Re: OS version?
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 14 May 2003 10:51:29 -0700
On 5/14/03 9:58 AM, "Emmanuel" <email@hidden> wrote:
>
How do I get the version (10.2.6) of my OS?
>
>
Finder's version returns "10.2.1", and Finder's product version returns "".
Do a
system attribute "sysv"
or - if you want to make sure it works in OS 8/9
tell application "Finder" to system attribute "sysv"
(In OS 8/9 that will re-compile as 'computer "sysv"').
That gives you the version as a decimal equivalence of teh hex number. So:
tell application "Finder" to set hexNum to system attribute "sysv"
set {a, x} to {hexNum div 4096, hexNum mod 4096}
set {b, y} to {x div 256, x mod 256}
set {c, d} to {y div 16, y mod 16}
if a "0" then set b to "" & a & b
set OSvers to "" & b & "." & c & "." & d
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >OS version? (From: Emmanuel <email@hidden>) |