• 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: An arbitrary if.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An arbitrary if.


  • Subject: Re: An arbitrary if.
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 12 Sep 2011 15:30:04 -0500

On Sep 12, 2011, at 2:51 PM, Alex Zavatone wrote:

I'm looking to see if I can set up a list of items I'd like to have anded in a logic statement and test for true or false. 
Something like this:

set x to "this is a cat"
set myList to {"this", "cat"}
set myResult to (x contains every item of myList)

Or if I have to walk the list of items I'd like anded.

Compare with this ...

set x to (words of "this is a cat") -- a list of words
set myList to {"this", "cat"}
set myResult to true
repeat with aword in myList
if not (x contains aword) then set myResult to false
end repeat

The first line can also be ...

set x to "this is a cat"
.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: An arbitrary if.
      • From: email@hidden
References: 
 >An arbitrary if. (From: Alex Zavatone <email@hidden>)

  • Prev by Date: An arbitrary if.
  • Next by Date: Re: An arbitrary if.
  • Previous by thread: An arbitrary if.
  • Next by thread: Re: An arbitrary if.
  • Index(es):
    • Date
    • Thread