Re: Evaluate text to boolean
Re: Evaluate text to boolean
- Subject: Re: Evaluate text to boolean
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 15 Jun 2002 12:01:04 -0700
On 6/15/02 10:35 AM, "Gnarlodious" <email@hidden> wrote:
>
So how do I make x a boolean?
In OS 10.1.2 + (AS 1.8.x), you can simply do
set x to x as boolean
which will work if x is "true" or false" (case-insensitive). If that's not
working for you, try not cramming everything onto one line.
In earlier versions of AS, just supply a handler
set x to my Boolicize(x)
on Boolicize(x)
if x = "true" then
return true
else if x = "false" then
return false
else
beep 100 -- or whatever
error number -128 -- or go on
end if
end
--
Paul Berkowitz
_______________________________________________
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.