Re: Finder Version Wrong in OS X
Re: Finder Version Wrong in OS X
- Subject: Re: Finder Version Wrong in OS X
- From: Philip Aker <email@hidden>
- Date: Wed, 10 Apr 2002 16:13:24 -0700
On Wednesday, April 10, 2002, at 07:53 AM, Paul Berkowitz wrote:
...in the fuss.
I fussed some more. The "pure" implementation is in NumVersion
and the system version offset in GetSystemVersion:
--
on NumVersion(theNumber)
--NB: Doesn't account for release status
set temp to (theNumber mod 256)
set vers_major to (theNumber - temp) div 256
set {vers_minor, vers_update} to {(temp div 16), (temp mod 16)}
return {vers_major, vers_minor, vers_update}
end NumVersion
--
on GetSystemVersion(theNumber)
-- NB: MacOS versioning mechanism started in System 6?
set sysv to NumVersion(theNumber)
set major to ((item 1 of sysv) div 4)
return "" & (major + 6) & "." & item 2 of sysv & "." & item 3 of sysv
end GetSystemVersion
--test
set num1 to (system attribute "sysv")
set num2 to 2144
{GetSystemVersion(num1), NumVersion(num1),
GetSystemVersion(num2), NumVersion(num2)}
Philip Aker
http://www.aker.ca
_______________________________________________
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.