Re: offset with spaces confusion
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.