• 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: Finder Version Wrong in OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Finder Version Wrong in OS X
      • From: Andy Wylie <email@hidden>
References: 
 >Re: Finder Version Wrong in OS X (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: InDesign Scripting
  • Next by Date: Re: Internet Shortcut _ Urgent
  • Previous by thread: Re: Finder Version Wrong in OS X
  • Next by thread: Re: Finder Version Wrong in OS X
  • Index(es):
    • Date
    • Thread