• 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: OS version questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS version questions


  • Subject: Re: OS version questions
  • From: Paul Berkowitz <email@hidden>
  • Date: Sun, 20 Jul 2003 08:00:13 -0700

On 7/19/03 4:08 AM, "Nigel Garvey" <email@hidden>
wrote:

>> I use the following, similar to what Rob offered, but a lot shorter. I've
>> added Dave's display dialog. If you are running OS X or late OS 9.1/2,
>> 'computer' will compile to 'system attribute'.
>>
>> display dialog "You are running system version " & GetSystemVersion()
>>
>> to GetSystemVersion()
>>
>> tell application "Finder" to set hexNum to computer "sysv"
>> set {a, X} to {hexNum div 4096, hexNum mod 4096}
>> set {b, y} to {X div 256, X mod 256}
>> set {c, d} to {y div 16, y mod 16}
>>
>> if a  "0" then set b to "" & a & b
>> set OSvers to "" & b & "." & c & "." & d
>>
>> return OSvers
>>
>> end GetSystemVersion
>
> Neat. :-) You've already pointed out in a follow-up that the 'if' line
> should start 'if a is not...', but the "0" should also be a *numeric* 0,
> otherwise the rest of the line will always be carried out.

Ooops. right, Thanks Nigel.
_______________________________________________
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:
    • unread mail
      • From: email@hidden
    • Entourage HTML Email: Tables and Graphics?
      • From: Jason Bourque <email@hidden>
References: 
 >Re: OS version questions (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: numeric date
  • Next by Date: Re: numeric date
  • Previous by thread: Re: OS version questions
  • Next by thread: Entourage HTML Email: Tables and Graphics?
  • Index(es):
    • Date
    • Thread