Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

alentzu

macrumors newbie
Original poster
Dear community

Could someone help me with an AppleScript that counts calendar events? I have hundreds of meetings a year and want to count them for statistics. It should count all events in a specific calendar filtered by event titles (the beginning letters) in a whole year (I need a whole year, and for each month separately).

- The script should ask for the year.
- count all events for the whole year and for every month in that year, filtered as follows:
- the titles begin with „Meeting“
- from that whole year
- in a specific calendar „private“ (iCloud calendar).


Example with Input 2018. The output could look like this:
Year 2018: 250 (meetings)
January: 22
February: 28
March: 19
April: 26
...
December: 22




Is that possible?
Thank you! Alen
 
Dear community

Could someone help me with an AppleScript that counts calendar events? I have hundreds of meetings a year and want to count them for statistics. It should count all events in a specific calendar filtered by event titles (the beginning letters) in a whole year (I need a whole year, and for each month separately).

- The script should ask for the year.
- count all events for the whole year and for every month in that year, filtered as follows:
- the titles begin with „Meeting“
- from that whole year
- in a specific calendar „private“ (iCloud calendar).


Example with Input 2018. The output could look like this:
Year 2018: 250 (meetings)
January: 22
February: 28
March: 19
April: 26
...
December: 22




Is that possible?
Thank you! Alen

Hi, alentzu
Are you still watching the thread?

I wrote a script that specifically tackles this task. It allows you to enter any event year and name, select any calendar and create a Numbers spreadsheet ("a workbook" in Excel's terminology) with entered data arranged as a table.

I post 2 links. One of them is a shared iCloud Drive link, the other one points to the MacScripter's thread I created with the script ready to be opened with Script Editor in case you may be wondering what's inside or whether it can compromise your system (hint: it can't.) Put the script to the folder "Scripts" of the folder "Library" of your home. Detailed description and instructions of use are in the heading of the script document, so, I urge you to read those beforehand.

iCloud Drive
Sort Calendar events by month

MacScripter:
Sort Calendar events by month

Both links are monitored and updated.
Report back if problems show up.
 
Last edited:
  • Like
Reactions: superscape
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.