I've been waiting for this functionality for a very long time and I truly hope the folks at Omni include this as a feature in an upcoming release. Until then, we can thank the fine people at UNITiD for this AppleScript.