• 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: Applescript-users Digest, Vol 2, Issue 627
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript-users Digest, Vol 2, Issue 627


  • Subject: Re: Applescript-users Digest, Vol 2, Issue 627
  • From: chet kelley <email@hidden>
  • Date: Thu, 29 Sep 2005 16:45:07 -0400

I've been working on an alarm clock script that will check my iCal calendars ("Work" and "Federal Holiday") for an event on the current day, check whether it's a weekend day, and play an iTunes song if either condition is false.  The problem I'm having is I can't get the script to find the iCal events that are scheduled for the current day only.  I can all the events, or none.  Is there a way to Here's my script:

set today to the date string of (current date)
tell application "iCal"
    activate
    view calendar at today
if today is "Saturday" or "Sunday" or (exists (event in calendar "Travel" whose start date ≤ today and end date ≥ today) and (event in calendar "Federal Holidays" whose start date ≤ today and end date ≥ today)) then
        display dialog "have fun sleeping in"
    else
        tell application "iTunes" to play track "Hells Bells"
    end if
end tell

 _______________________________________________
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: Applescript-users Digest, Vol 2, Issue 627
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Accessing network folders in AppleScript
  • Next by Date: Re: make a new folder within an exisitng folder
  • Previous by thread: RE: Accessing network folders in AppleScript
  • Next by thread: Re: Applescript-users Digest, Vol 2, Issue 627
  • Index(es):
    • Date
    • Thread