Here’s some API that might make this easier in the future:
-
Outline.getOutlines()
returns list of all open outlines. -
outline.getPath()
return the file path associated with outline.
That way you can easily access multiple outlines (and identify them by path) within a single TaskPaper script context. I’m documenting these as public going forward.