Skip to content

Instantly share code, notes, and snippets.

View crsrusl's full-sized avatar

Chris Russell crsrusl

View GitHub Profile
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
const recognition = new SpeechRecognition();
recognition.lang = 'en-US';
recognition.interimResults = false;
recognition.addEventListener('result', (e) => {
let last = e.results.length - 1;
let text = e.results[last][0].transcript;
tell application "Microsoft Outlook"
set theMessage to first item of (get current messages)
set theSubject to the subject of theMessage
set theBody to the plain text content of theMessage
set theID to the id of theMessage
end tell
tell application "Things3"
show quick entry panel with properties {name:theSubject, notes:theBody}
end tell