Vaccine Passport Shortcut

Like much of the world, our province has instituted a vaccine passport system for indoor spaces, restaurants, etc. It’s always a pain to scroll through your photo library to get to the screenshot of your vaccine card.

Below is a very easy solution involving a two step shortcut. Here’s a preview:

To set this up, you’ll have to make a separate album in your Photos app just for your vaccine card. I’ve called mine “ID”

Next, install the following shortcut in your Shortcuts app.

Finally, you can send this shortcut to your Home Screen to have easy access next time you are in line to get in to the restaurant. Bon appetit! 🍽

Retroactive Completion Dates in Things

Pretty self-explanatory really. Just a small applet to set the completion date of your to do in the past. You’ll need to create a new “Cocoa-AppleScript Applet” from template and put the following in main.


— main.scpt
— Cocoa-AppleScript Applet
— Copyright 2011 {Your Company}. All rights reserved.
— This is the main script for a Cocoa-AppleScript Applet.
— You can put the usual script applet handlers here.
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"
use script "BridgePlus" — for pre-10.11 compatibility
on date_pick(theMessage)
if not (current application's NSThread's isMainThread()) as boolean then
display alert "This script must be run from the main thread." buttons {"Cancel"} as critical
error number -128
end if
— create a view
set theView to current application's NSView's alloc()'s initWithFrame:(current application's NSMakeRect(0, 0, 100, 200))
— create date picker
set datePicker to current application's NSDatePicker's alloc()'s initWithFrame:(current application's NSMakeRect(0, 0, 100, 100))
— set style: choices are NSTextFieldAndStepperDatePickerStyle, NSClockAndCalendarDatePickerStyle, or NSTextFieldDatePickerStyle
datePicker's setDatePickerStyle:(current application's NSClockAndCalendarDatePickerStyle)
— set elements: choices include NSHourMinuteDatePickerElementFlag, NSHourMinuteSecondDatePickerElementFlag, NSTimeZoneDatePickerElementFlag, NSYearMonthDatePickerElementFlag, and NSEraDatePickerElementFlag
datePicker's setDatePickerElements:((current application's NSYearMonthDayDatePickerElementFlag) + (current application's NSHourMinuteSecondDatePickerElementFlag as integer))
— set initial date
datePicker's setDateValue:(current application's NSDate's |date|())
— get the size it needs
set theSize to datePicker's fittingSize()
–resize the picker and view accordingly
theView's setFrameSize:theSize
datePicker's setFrameSize:theSize
— add the picker to the view
theView's setSubviews:{datePicker}
— create an alert
set theAlert to current application's NSAlert's alloc()'s init()
— set up alert
tell theAlert
its setMessageText:theMessage
its setInformativeText:"Any date"
its addButtonWithTitle:"OK"
its addButtonWithTitle:"Cancel"
its setAccessoryView:theView
end tell
— show alert in modal loop
set returnCode to theAlert's runModal()
if returnCode = (current application's NSAlertSecondButtonReturn) then error number -128
— retrieve date
set theDate to ASify from (datePicker's dateValue()) — or simply coerce to date in 10.11
–> date "2015年8月20日木曜日 19:43:58"
return theDate
end date_pick
if button returned of (display dialog "You need to have your To-Do highlighted in Things. Continue?" buttons {"No", "Continue"}) is "Continue" then
set theCompletionDate to my date_pick("When did you complete the selected to do?")
tell application "Things3"
set theList to the selected to dos
repeat with theToDo in theList
set the completion date of theToDo to theCompletionDate
end repeat
end tell
end if
tell current application to quit

Repeating Evening Tasks

Ben Eskola posted this brilliant script on reddit. It takes any repeating To-Dos in Things tagged “Evening” and moves them to Evening section of Today list.


— 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