I’ve mentioned EventScripts before, but I’m finding it awesome enough lately to mention again. I use it in tandem with BetterTouchTool, but for different purposes.
This is a companion discussion topic for the original entry at https://brettterpstra.com/2013/05/11/eventscripts-and-reliable-bluetooth-proximity-detection