• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OS version?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: OS version?
      • From: Paul Berkowitz <email@hidden>
References: 
 >OS version? (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: OS version?
  • Next by Date: Re: Script to change file name
  • Previous by thread: Re: OS version?
  • Next by thread: Re: OS version?
  • Index(es):
    • Date
    • Thread