Re: Sorting list of calendar events
Re: Sorting list of calendar events
- Subject: Re: Sorting list of calendar events
- From: Christian Boyce <email@hidden>
- Date: Thu, 16 Apr 2015 07:22:53 -0700
- Sendlaterdate: Thu, 16 Apr 2015 07:22:51 -0700
Here's how I do it-- been running this script automatically for five years.
The part of my script that does the sorting is here:
-- This is the sorting subroutine. I found it on MacScripter.net.on findLeastItem(lst)tell application "iCal"set theLeast to start date of item 1 of lstset theIndex to 1set iterater to 1repeat with i in lstif start date of i ≤ theLeast thenset theLeast to start date of iset theIndex to iteraterend ifset iterater to iterater + 1end repeat
Check out the whole script at the link I provided. It tells the whole story.
c On Apr 16, 2015, at 12:48 AM, Jan Erik Moström < email@hidden> wrote: I haven't been writing applescript for several years so I've forgotten almost everything. However, I'm now trying to cobble together an applescript that reads today's events from the Calendar, I then going to create a simple text note from this.
My problem is that I want to entries sorted by time so that the first event of the day is always first etc.
I use this line to get the events
set theEvents to every event whose ((start date of it) ≥ (todayDate) and (end date of it) ≤ (tomorrowDate))
but how to I do the sorting?
_______________________________________________
|
_______________________________________________
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