• 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: Christopher Stone <email@hidden>
  • Date: Mon, 12 Sep 2011 16:38:26 -0500

On Sep 12, 2011, at 16:07, Christopher Stone wrote:
# Changing Luther's script just a bit to exit repeat on first NOT.
______________________________________________________________________

Hey Alex,

I didn't think the problem through when I looked at Luther's code.  It is not necessary to turn 'x' into a list; contains works perfectly well with strings.

--
Best Regards,
Chris

--------------------------------
set x to "this is a cat"
set myList to {"this", "cat"}
set myResult to true

repeat with aword in myList
if not (x contains aword) then
set myResult to false
exit repeat
end if
end repeat
--------------------------------
 _______________________________________________
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: "Mark J. Reed" <email@hidden>
    • Re: An arbitrary if.
      • From: Alex Zavatone <email@hidden>
References: 
 >An arbitrary if. (From: Alex Zavatone <email@hidden>)
 >Re: An arbitrary if. (From: Christopher Stone <email@hidden>)

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