Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Automatically set repeating tasks tagged ‘Evening’ to be done this evening, in Things 3 — updated versions here: https://github.com/benjamineskola/things-scripts/blob/master/evening.applescript
-- run first thing in the morning, e.g., from cron
tell application "Things3"
set theToken to "your-auth-token"
set theTodos to to dos of list "Today"
repeat with aTodo in theTodos
set tagList to tags of aTodo
repeat with aTag in tagList
if (name of aTag as text) is "Evening"
if class of aTodo is project
set urlCommand to "update-project"
else
set urlCommand to "update"
end if
set theUrl to "things:///" & urlCommand & "?auth-token=" & theToken & "&id=" & (id of aTodo as text) & "&when=evening"
open location theUrl
end if
end repeat
end repeat
end tell
@patrickrushton
Copy link

patrickrushton commented Aug 29, 2020

This is great! Is there a simple way to remove the "Evening" tag from the tasks once they've been moved to the evening?

@patrickrushton
Copy link

patrickrushton commented Aug 29, 2020

This achieves what I was aiming for:
delete tag "Evening" of aTodo

@feedmybongos
Copy link

feedmybongos commented Dec 7, 2020

Thanks for sharing this. Is there any way to replicate this applescript/automation on iOS?

@michaelbmiller
Copy link

michaelbmiller commented Sep 28, 2022

Thanks for sharing this. Is there any way to replicate this applescript/automation on iOS?

I was wondering the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment