• 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: BBEdit - test result of Find
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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. |
----------------------------------------------------------------------


  • Prev by Date: Unicode literals
  • Next by Date: Re: Acrobat Scripting
  • Previous by thread: BBEdit - test result of Find
  • Next by thread: Re: BBEdit - test result of Find
  • Index(es):
    • Date
    • Thread