• 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: Newbie, every word where it contains "ox"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Newbie, every word where it contains "ox"
      • From: Rob Stott <email@hidden>
  • Prev by Date: Re: Newbie, every word where it contains "ox"
  • Next by Date: Re: Newbie, every word where it contains "ox"
  • Previous by thread: Re: Newbie, every word where it contains "ox"
  • Next by thread: Re: Newbie, every word where it contains "ox"
  • Index(es):
    • Date
    • Thread