• 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: Determining OS Version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining OS Version


  • Subject: Re: Determining OS Version
  • From: Jesse Almanrode - JA Computing <email@hidden>
  • Date: Mon, 25 Jan 2010 11:00:01 -0700

How about you simply run this command

do shell script "sw_vers -productVersion"


This will return a string that is the current version of OS X. This seems to work on all versions of OS X that I have worked on (even back to 10.3)


---<O><O><O>---
Jesse Almanrode
Webmaster/Netcaster
www.jacomputing.net

Check out the iScript Netcast on iTunes


On Mon, Jan 25, 2010 at 10:55 AM, Luther Fuller <email@hidden> wrote:
On Jan 25, 2010, at 11:28 AM, Marconi wrote:

This is certainly a step in the right direction but I get the error:

Can't get ProductVersion of {|ProductUserVisibleVersion|:"10.4.11",|ProductCopyright...}.

Mmmmmmmmmmmmmmmmm. Aha!

In Tiger, you need pipes around the record item names. Like this ...

tell application "System Events" to set systemRecord to (value of property list file systemFile)
set sysVersion to (|ProductVersion| of systemRecord)
set buildNr to (|ProductBuildVersion| of systemRecord)
display dialog "Mac OS X version " & sysVersion & " (" & buildNr & ")" buttons {"OK"} default button 1
end open

Now, it works with Tiger, Leopard and Snow Leopard.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Determining OS Version
      • From: Luther Fuller <email@hidden>
References: 
 >Re: Determining OS Version (From: Luther Fuller <email@hidden>)
 >Re: Determining OS Version (From: Luther Fuller <email@hidden>)
 >Re: Determining OS Version (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Determining OS Version
  • Next by Date: Re: Determining OS Version
  • Previous by thread: Re: Determining OS Version
  • Next by thread: Re: Determining OS Version
  • Index(es):
    • Date
    • Thread