Re: Newbie, every word where it contains "ox"
Re: Newbie, every word where it contains "ox"
- Subject: Re: Newbie, every word where it contains "ox"
- From: Steve Thompson <email@hidden>
- Date: Thu, 08 Aug 2002 12:59:30 +0100
set myString to "the fox oxon can count 1 2 3 and he love nox"
set a to every word of myString
set b to {}
repeat with x in a
if x contains "ox" then set end of b to (x as string)
end repeat
B
-->{"fox","oxon","nox"}
On 8/8/02 11:41 am, "Steen" <email@hidden> wrote:
>
Hello list
>
>
OS 9.1
>
>
I try to get words that contains "ox" from a string.
>
>
I get an error (-1728)
>
Do I need to make a loop, how do I do it?
>
>
Thanks, Steen
>
>
>
set myString to "the fox oxon can count 1 2 3 and he love nox"
>
>
set a to every word of myString where it contains "ox"
>
if a is not equal to "fox" then
>
beep
>
end if
>
if a is equal to "nox" then
>
beep
>
end if
>
a
>
_______________________________________________
>
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.
_______________________________________________
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.