• 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: Best practices- nested loops or handlers or both
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best practices- nested loops or handlers or both


  • Subject: Re: Best practices- nested loops or handlers or both
  • From: David Andrews <email@hidden>
  • Date: Mon, 1 Nov 2004 21:34:17 -0500

Your logic will not work for "Sunday":

set aDay to "Sunday"
aDay contains "Saturday" or "Sunday" --> false
aDay is in {"Saturday", "Sunday"} --> true

David A

On Nov 1, 2004, at 8:28 PM, Dave Balderstone wrote:


On Nov 1, 2004, at 6:58 PM, Eric Geoffroy wrote:

OK. Worked for two+ hours and can't figure out how to return from the isWeekend(d) handler. I scoured the Neuberg book and I'm missing something.

set d to current date my isweekend(d) set theDay to result theDay

on isweekend(d)
	if ((weekday of d) as string) contains "Saturday" or "Sunday" then
		return true
	else
		return false
	end if
end isweekend

_______________________________________________ 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
  • Follow-Ups:
    • Re: Best practices- nested loops or handlers or both
      • From: Dave Balderstone <email@hidden>
References: 
 >Best practices- nested loops or handlers or both (From: Eric Geoffroy <email@hidden>)
 >Re: Best practices- nested loops or handlers or both (From: "Adam K. Wuellner" <email@hidden>)
 >Re: Best practices- nested loops or handlers or both (From: Eric Geoffroy <email@hidden>)
 >Re: Best practices- nested loops or handlers or both (From: Dave Balderstone <email@hidden>)

  • Prev by Date: Re: Best practices- nested loops or handlers or both
  • Next by Date: Re: Best practices- nested loops or handlers or both
  • Previous by thread: Re: Best practices- nested loops or handlers or both
  • Next by thread: Re: Best practices- nested loops or handlers or both
  • Index(es):
    • Date
    • Thread