Created
April 23, 2014 11:56
-
-
Save hetima/11212483 to your computer and use it in GitHub Desktop.
Reminders.app 実行するたび締め切りが延びる魔法のスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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