@matt Commentary allows you to run Lua code to add custom actions etc., but I'm not sure if it supports per-app scripting. They also have something similar to VoiceOver's screen recognition, which may be able to make heads or tails of it. I don't use CSR though, I don't trust it.