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

Re: Return Current OS


  • Subject: Re: Return Current OS
  • From: David Glass <email@hidden>
  • Date: Wed, 20 Nov 2002 11:35:20 -0800

On 11/20/02 8:09, "Sgt. Pepper" <email@hidden> wrote:

> Hello,
> Can someone please help me with this syntax. I am writing a script
> in which I need to determine the OS of the mac that the script is
> running. I have tried everything I could think of and all I was able
> to do was to get Apple System Profiler to return a Unicode Text Doc.
> Here's a brief example of what I'm looking to do:
>
> tell some app
> get current OS
> if result is "10.x" then
> do OS X stuff
> else
> do OS 9 stuff
> end if
> end tell
>

My initial thought would be to do something like this:

try
some basic OS X command perhaps 'do shell script'
set OS flag to X
on error
must be OS 9
set OS flag to 9
end try

This gets more complicated if you want to check for more OS versions.

--
David Glass
email@hidden
_______________________________________________
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: 
 >Return Current OS (From: "Sgt. Pepper" <email@hidden>)

  • Prev by Date: Re: Script Editor Alternative?
  • Next by Date: Re: Making Terminal quit
  • Previous by thread: Return Current OS
  • Next by thread: Re: Return Current OS
  • Index(es):
    • Date
    • Thread