• 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: offset with spaces confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: offset with spaces confusion


  • Subject: Re: offset with spaces confusion
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 3 May 2002 10:34:34 -0700

On Friday, May 3, 2002, at 08:36 AM, email@hidden wrote:

It cropped up this morning. I am working on a script that creates price
lists. In one bit of fiddling, if the word "New" appears in the
description, then I have to change the colour of it. Simple, but some of
the product styles include "Newark", "Newport" and "Newton" to name a few.
Which all contain "New" and produce the wrong effect. Because the word
"New" can appear anywhere, I can't look for "<space>new<space>" so I was
looking in to other ways of doing it. That's when I noticed this.

How about this:
set foo to "this is a new job"
set bar to every word of foo
"new" is in bar
--> true

set foo to "this is a Newark job"
set bar to every word of foo
"new" is in bar
--> false

--Michelle

We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
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.

  • Prev by Date: getting verbose user input
  • Next by Date: Re: More newbie queries: paths
  • Previous by thread: Re: offset with spaces confusion
  • Next by thread: Re: offset with spaces confusion
  • Index(es):
    • Date
    • Thread