lemonmade/templates

Script fails with folder named "Templates"

johnflavin opened this issue · 0 comments

I wasn't able to run the Template.scpt script. It would ask me to define my variable symbol, then silently fail. I had tried running from within OmniFocus, but when that didn't work I ran from within ScriptEditor. Here is the output log from ScriptEditor:

tell application "OmniFocus"
    get every flattened project of default document whose name of folder contains "Template" and effectively hidden of folder = false and status ≠ dropped and status ≠ done and name does not contain "!exclude"
        --> {project id "bDfF1BpK5iZ" of document id "oPaA1RG3Z7G", project id "cNAa4w6f1Tu" of document id "oPaA1RG3Z7G"}
    get item 1 of every flattened folder of default document whose name = "Template"
        --> error number -1719 from item 1 of every flattened folder of default document whose name = "Template"
end tell

I have my templates in a folder named "Templates", which the script can find. But then it looks like the script fails when trying to find a folder exactly named "Template", which does not exist for me.