RE: Newbie Question...
RE: Newbie Question...
- Subject: RE: Newbie Question...
- From: "Dunn, Frederick J" <email@hidden>
- Date: Mon, 9 Jun 2008 09:37:45 -0500
- Thread-topic: Newbie Question...
That is what I would do in any other scripts but to keep consistency
with BigFix I stayed with their syntax even though I knew if the
"exists" returned true I did not need the condititional statement.
Thanks for your response.
Fred Dunn
-----Original Message-----
From: email@hidden [mailto:email@hidden] On Behalf Of Mark
J. Reed
Sent: Monday, June 09, 2008 9:31 AM
To: Dunn, Frederick J
Cc: Peter Baxter; email@hidden
Subject: Re: Newbie Question...
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