Re: Warning about 'system attributes' command in Yosemite
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....
… or you can run
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