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

Re: if statement


  • Subject: Re: if statement
  • From: Pier Kuipers <email@hidden>
  • Date: Fri, 16 Feb 2001 22:28:04 +0000

>How can I set apple script to use an "if" statement to check if the
>version of an specific operating system lets say 8.6 is active or
>"true" then proceed to run any command, else if the operating system
>is, lets say 9.1, then proceed to run any command. I just need to
>know how to specify the operating system in use in an if statement
>through AppleScript.

Probably the simplest script of all:

tell application "Finder"
if (version) contains "9" then
display dialog "It's OS 9!"
else
display dialog "It's not OS 9!"
end if
end tell

No scripting additions needed. Ain't it wonderful?
--
Pier Kuipers
Visual ID
* the Media Asset Management solution *

2 Whitefriars
Aungier Street
Dublin 2
Tel. +353 1 476 7059
Mobile +353 87 294 3063
Fax +353 1 478 1366
ISDN +353 1 602 0754

http://www.visualid.com


References: 
 >if statement (From: "Braulio Gonzales" <email@hidden>)

  • Prev by Date: Re: Admin: a suggestion on the script corruption problem.
  • Next by Date: Re: QuarkXPress: Script crashes: why?
  • Previous by thread: Re: if statement
  • Next by thread: Re: Script Editor crashing constantly- found the culprit
  • Index(es):
    • Date
    • Thread