Created
October 16, 2022 19:47
-
-
Save moritzz/ace1d7fe67ddd08335667262579ebb81 to your computer and use it in GitHub Desktop.
Apple Script to transfer all to dos of a Things list to a Apple Reminder list
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" | |
-- ask which list to add to | |
set allLists to name of every list | |
set chosenReminderList to (choose from list allLists with prompt "Select the list to add reminders to" without empty selection allowed) | |
-- if the user presses cancel, abort | |
if chosenReminderList is false then return | |
set chosenReminderList to chosenReminderList as string | |
end tell | |
tell application "Things3" | |
set allLists to name of every list | |
set chosenThingsList to (choose from list allLists with prompt "Select the list to add reminders from" without empty selection allowed) | |
-- if the user presses cancel, abort | |
if chosenThingsList is false then return | |
set myLists to every list whose name is chosenThingsList | |
repeat with myList in myLists | |
set myTodos to to dos in myList | |
set myCount to 0 | |
repeat with myTodo in myTodos | |
set myCount to myCount + 1 | |
set myName to name of myTodo | |
set myTags to every tag of myTodo | |
set myTagNames to "" | |
repeat with myTag in myTags | |
set myTagNames to myTagNames & " #" & (name of myTag) | |
end repeat | |
if myTagNames is not "" then | |
set myName to myName & " " & myTagNames | |
end if | |
set myBody to notes of myTodo | |
tell application "Reminders" | |
tell list chosenReminderList | |
make new reminder at end ¬ | |
with properties {name:myName, body:myBody} | |
end tell | |
end tell | |
end repeat | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment