Re: booleans...
Re: booleans...
- Subject: Re: booleans...
- From: Stan Cleveland <email@hidden>
- Date: Mon, 19 Mar 2018 22:03:09 -0700
On Mar 19, 2018, at 09:43 PM, Jean-Christophe Helary
<email@hidden> wrote:
>
> myBoolean(alias (((path to desktop) & "not.there") as text))
>
> just gives me an error.
Hi Jean-Christophe,
I see the problem. Interestingly, the error happens before the handler is even
called. You need the error to happen inside the handler.
If you don't mind making a special-purpose myBoolean handler, you can get what
you need. Just move the alias term from the handler call to inside the handler.
You must also be sure that the passed-in path is an HFS string.
on pathExists(myPathString)
try
alias myPathString
set succeeded to true
on error
set succeeded to false
end try
return succeeded
end pathExists
pathExists("" & (path to desktop) & "not.there")
Stan C.
_______________________________________________
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