Re: BBEdit - test result of Find
Re: BBEdit - test result of Find
- Subject: Re: BBEdit - test result of Find
- From: Michelle Steiner <email@hidden>
- Date: Tue, 25 Sep 2001 15:30:06 -0700
On 9/25/01 1:59 PM, email@hidden <email@hidden> wrote:
>
My script opens a file in BBEdit to check if a text string is present in the
>
file. Depending on whether the text is found, a value is set in a variable.
>
The problem is, the variable gets set to "color" even when the text is
>
found. Any ideas?
>
>
find "ColorUsage: Color" searching in text 1 of text window 1 with starting
>
at top
>
if false then
>
set color_flag to "bw"
>
else
>
set color_flag to "color"
>
end if
You need to say what you're testing for true or false.
set foo to found of (find "ColorUsage: Color" searching in text window 1
with starting at top)
if foo is false then
set color_flag to "bw"
else
set color_flag to "color"
end if
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------