Posted at

Cocoaの機能を使ってRemindersで新規リマインダーを作成するAppleScript

More than 3 years have passed since last update.


  • Reminders.appにはAppleScript用語辞書があり、リマインダーを作成できる

  • CocoaではEKEventStoreクラスとEKReminderクラスを使ってリマインダーを作成する

  • 下2つのAppleScriptは同じ操作


    • Cocoaの機能を使った方はReminders.appを起動しなくても使える




make_new_reminder_from_pure_AppleScript.scpt

tell application "Reminders"

make new reminder at default list with properties {name:"New Reminder from pure AppleScript"}
end tell


make_new_reminder_from_ASObjC.scpt

use framework "EventKit"

set eventStore to current application's EKEventStore's alloc()'s initWithAccessToEntityTypes:(current application's EKEntityMaskReminder)
set reminder to current application's EKReminder's reminderWithEventStore:eventStore
set reminder's title to "New Reminder from ASObjC"
set reminder's calendar to eventStore's defaultCalendarForNewReminders
eventStore's saveReminder:reminder commit:true |error|:(missing value)



更新履歴


  • 2016-08-26: pure AppleScript版とASObjC版を作成