• 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: Nigel Garvey <email@hidden>
  • Date: Sat, 19 Jul 2003 01:29:23 +0100

"Dave Miller" wrote on Fri, 18 Jul 2003 10:16:17 -0700:

>Can anyone tell me if it is possible to have a single script run as a
>stand-alone application on OS 8.x, 9.x and OS X?

Currently, if such a script is saved in 9.2.2 or 10.2, or as an
X-compatible app in earlier versions of 9, it'll be viable in X and in
any previous system where CarbonLib is installed and usable. However, it
won't open in 8 if it contains a 'system attribute' command. If it's
saved in 8, it'll only be viable in 8 or 9. Whether or not it'll actually
*work* on any particular system depends on the individual peculiarities
of the target software and the way the script's written. It's very rare
for a script written for one of the earlier Finders to work in X without
extra splints and rubber bands.

>If so, is there a way that the script can detect which OS it is running on?
>
>My theoretical application would pop up a dialog box saying "You are running
>system version x.xx"

You can tell what Finder version is running:

tell application "Finder"
activate
get version
display dialog "You are running Finder version " & result
end tell

But the Finder version isn't necessarily the same as the system version.
You need something like this:

tell application "Finder"
activate
set sysVersion to product version
if sysVersion is not "" then
display dialog "You are running system version " & sysVersion
else
display dialog " Hello. Welcome to Mac OS X. Please use another
script to see what Mac OS version you're running."
end if
end tell

;-)

NG
_______________________________________________
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: OS version questions
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Ethan Rips, your autoreply gone renegade!
  • Next by Date: Re: System Events "Show Clipboard" Bug?
  • Previous by thread: Re: Saving a MS Excel Document as webpage
  • Next by thread: Re: OS version questions
  • Index(es):
    • Date
    • Thread