• 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: Newbie Question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Question...


  • Subject: Re: Newbie Question...
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 9 Jun 2008 10:31:16 -0400

On Mon, Jun 9, 2008 at 10:24 AM, Dunn, Frederick J <email@hidden> wrote:
>
> if
>
> exists file "FileVaultMaster.cer" of folder "/Library/Keychains" then true
> else false

If I might suggest a small improvement: there's never a need to do "if
... then true else false", no matter what's in place of the "...".
For such an expression to work, the thing between the "if" and "then"
must already be either a true or false value itself, so you can just
use it directly.  Something like this should work in your case:

    (exists file "FileVaultMaster.cer" of folder "/Library/Keychains")

For example:

on hasFileVault
    return (exists file "FileVaultMaster.cer" of folder "/Library/Keychains")
end hasFileVault

--
Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Newbie Question...
      • From: KOENIG Yvan <email@hidden>
    • RE: Newbie Question...
      • From: "Dunn, Frederick J" <email@hidden>
References: 
 >RE: Newbie Question... (From: "Dunn, Frederick J" <email@hidden>)
 >RE: Newbie Question... (From: "Dunn, Frederick J" <email@hidden>)

  • Prev by Date: RE: Newbie Question...
  • Next by Date: RE: Newbie Question...
  • Previous by thread: RE: Newbie Question...
  • Next by thread: RE: Newbie Question...
  • Index(es):
    • Date
    • Thread