• 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: Deivy Petrescu <email@hidden>
  • Date: Fri, 17 Oct 2014 20:27:32 -0400


On Oct 17, 2014, at 4:06 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....

-- 

Bill Cheeseman - email@hidden


… or you can run


system info


Which I believe goes far back enough.
 _______________________________________________
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

References: 
 >Warning about 'system attributes' command in Yosemite (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Scripting mail attachments in Yosemite
  • Next by Date: Re: Scripting mail attachments in Yosemite
  • Previous by thread: Warning about 'system attributes' command in Yosemite
  • Next by thread: Re: Warning about 'system attributes' command in Yosemite
  • Index(es):
    • Date
    • Thread