• 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: Warning about 'system attributes' command in Yosemite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning about 'system attributes' command in Yosemite


  • Subject: Re: Warning about 'system attributes' command in Yosemite
  • From: John Baltutis <email@hidden>
  • Date: Fri, 17 Oct 2014 23:22:26 -0700

On Oct 17, 2014, at 6:19 PM, Bill Cheeseman <email@hidden> wrote:

Here's a warning for those of you who still use the old 'system attributes "sysv"' statement to get the currently running version of OS X in your scripts. In OS X 10.10 Yosemite it returns 4240, which in hexadecimal is 1090, which is binary coded decimal (BCD) for version 10.9.0. I'm not sure, but I think this statement relies on gestalt, which was deprecated a couple of versions ago. Part of the problem is that there is no way to represent 10.10.0 in a 4-digit BCD format.

As far as I know, the currently favored technique for testing the current system version is something like the following. It works back enough versions that almost nobody would run into trouble using it.

considering numeric strings
set LionOrNewer to system version of (system info) ≥ "10.7"
end considering
if LionOrNewer then....

Just a SWAG, but this should do the trick.

do shell script "sw_vers -productVersion"
 _______________________________________________
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

  • Prev by Date: Re: scripting Illustrator CS6
  • Next by Date: Re: scripting Illustrator CS6
  • Previous by thread: Re: Warning about 'system attributes' command in Yosemite
  • Next by thread: Script to unencode a GREP token into plain english in (used in InDesign not sure if I got in on Adobe forum ID board).
  • Index(es):
    • Date
    • Thread