Skip to content

Instantly share code, notes, and snippets.

@hetima
Created April 23, 2014 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hetima/11212483 to your computer and use it in GitHub Desktop.
Save hetima/11212483 to your computer and use it in GitHub Desktop.
Reminders.app 実行するたび締め切りが延びる魔法のスクリプト
tell application "Reminders"
set reminderTitle to "Shimekiri"
set listTitle to "work"
set workerList to list listTitle
-- remove old reminder
set ids to {}
repeat with r in reminder of workerList
if name of r is reminderTitle then
set the end of ids to (id of r)
end if
end repeat
repeat with idToDelete in ids
delete reminder id idToDelete
end repeat
-- add new reminder
set duedate to (current date) + (10 * days)
set rdate to duedate - (24 * hours)
tell workerList
set newToDo to make new reminder with properties {name:reminderTitle, due date:duedate, remind me date:rdate}
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment