• 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?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS version?


  • Subject: Re: OS version?
  • From: Paul Berkowitz <email@hidden>
  • Date: Wed, 14 May 2003 10:59:51 -0700

On 5/14/03 10:51:29:AM, I wrote:

> On 5/14/03 9:58 AM, "Emmanuel" <email@hidden> wrote:
>
>> How do I get the version (10.2.6) of my OS?
>>
>> Finder's version returns "10.2.1", and Finder's product version returns
> "".
>
>
> Do a
>
> system attribute "sysv"
>
> or - if you want to make sure it works in OS 8/9
>
> tell application "Finder" to system attribute "sysv"
>

This method has the advantage over the others mentioned here in that it
allows you to do comparisons with integers, not strings. If you're not
interested in the version as a string but just doing a check to see if a
user's OS version is recent enough to use your script, stop right there.

set num to tell application "Finder" to system attribute "sysv"
if num < 4129 then
beep
display dialog "You must have OS 10.2.1 or higher to use this
version of Smile." buttons {"Cancel"} default button 1 with icon 0
error number -128
end if

--
Paul Berkowitz
_______________________________________________
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.

References: 
 >OS version? (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Script to change file name
  • Next by Date: Re: OS version?
  • Previous by thread: Re: OS version?
  • Next by thread: Re: OS version?
  • Index(es):
    • Date
    • Thread