• 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: Help with the "Contains" command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with the "Contains" command


  • Subject: Re: Help with the "Contains" command
  • From: Andrew Oliver <email@hidden>
  • Date: Tue, 19 Oct 2004 12:39:13 -0700

On 10/19/04 11:45 AM, "Vic Piercy" <email@hidden> wrote:

> I am trying to use "Contains" in my script but it is not working
> correctly. I was wondering if anyone can help. Here is what I am trying
> to do.
>
> Tell application "Illustrator CS"
> activate
>
> tell document 1
> set my_spot to name of spot 1 as text
> if my_spot contains "Home" or "165" or "Orange" then...........
>
>
> I would like to add more then the "Home" text to search for. I tried
> {"Home", "165", "orange"} but that fails to work.
>
> any help would be appreciated. Thank You!
>
> Vic Piercy

You need multiple 'contains' statements:

If my_sport contains "Home" or my_sport contains "165" or my_sport contains
Orange" then...

If you break down your original statement you'd read it as:

if (my_spot contains "Home")
 or
 ("165")
 or
 ("Orange")
then...

So you can see why multiple 'contains' statements are required.

Andrew
:)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Help with the "Contains" command (From: Vic Piercy <email@hidden>)

  • Prev by Date: Re: Help with the "Contains" command
  • Next by Date: Re: Scripting MS Word "Insert Subdocument"
  • Previous by thread: Re: Help with the "Contains" command
  • Next by thread: Re: Help with the "Contains" command
  • Index(es):
    • Date
    • Thread