↓ Skip to main content
  1. Blog/

Fixing the Outlook-to-OmniFocus Script

·166 words·1 min·
Diego Zamboni
Author
Diego Zamboni

Here’s how to fix the breakage caused by one of the recent updates to Microsoft Outlook in the Outlook-to-OmniFocus AppleScript included with my SendToOmniFocus spoon.

One of the recent updates to Microsoft Outlook broke the Outlook-to-OmniFocus AppleScript (courtesy of Veritrope) included with my SendToOmniFocus spoon. I’m not sure which precise version introduced the breaking change, I’m currently at version “15.39 (170905)”, and the breakage started one or two updates ago. After some investigation, I found the cause — it seems Outlook AppleScript objects no longer have a “properties” field which contains things like “subject”, “content”, etc., rather their properties can be accessed directly on the object.

I have submitted a pull-request for the fix, but if you want to apply it right away, just change the following line in ~/.hammerspoon/Spoons/SendToOmniFocus.spoon/scripts/outlook-to-omnifocus.applescript:

set theProps to (properties of selectedItem)

to the following:

try
        set theProps to (properties of selectedItem)
on error
        set theProps to selectedItem
end try

This tries the old behavior, and upon failure uses the new one.

Share this article

Just Enough Lua to Be Productive in Hammerspoon, Part 1

·1326 words·7 mins
Hammerspoon’s configuration files are written in Lua, so a basic knowledge of the language is very useful to be an effective user of Hammerspoon. In this two-part article I will show you the basics of Lua so you can read and write Hammerspoon configuration. Along the way you will discover that Lua is a surprisingly powerful language.

Using Spoons in Hammerspoon

·2021 words·10 mins
In this second article about Hammerspoon, we look into Spoons, modules written in Lua which can be easily installed and loaded into Hammerspoon to provide ready-to-use functionality. Spoons provide a predefined API to configure and use them. They are also a good way to share your own work with other users.