I wish to have a macro copy an OmniFocus action as TaskPaper, extract the estimated duration from the resulting text, and use that value in a URL to be handled by another app (Brad Jasper's Focus).
Focus handles URLs. For example, you can send
focus://focus?minutes=20
and Focus will start a 20 minute session.
Copying the TaskPaper text is very easy (there's an OmniFocus menu command). The result looks like:
- Do the thing. Comment: @flagged @estimate(20m) @tags(tagA,tagB)
I think some regex should be able to extract the "20" from that. Then I imagine simply storing that text (i.e. the "20") in a KM variable and passing it to the production of a new "Open a URL" command.
But I'm afraid the regex and variable handling are beyond my KM expertise at present. Any solutions would be much appreciated.