Query about script created ComplexPoint (send email from Mail to TaskPaper)

ComplexPoint created a KM macro to send an email from Mail to TaskPaper in this post:

I am using the latest version of TaskPaper (Version 3.5 Preview (275)) and the macro now does not work and generates an errror:

/var/folders/9k/jcdgkqrn7pg3qx8sq3jcgdq80000gn/T/Keyboard-Maestro-Script-B8304822-64DD-4EF9-BFFB-4526621058AF:6705:6766: execution error: Error on line 206: Error: Application can’t be found. (-2700)

which I believe points to this line in the JavaScript:

var ds = Application(“com.hogbaysoftware.TaskPaper3”)

Although this is not strictly a KM issue, is it possible to determine what the correct identification for the app is now?

I think I have found the answer, in that:

var ds = Application(“com.hogbaysoftware.TaskPaper3”)

needs changing to:

var ds = Application(“com.hogbaysoftware.TaskPaper3.direct”)

I found information on how to find the bundle identifier of an OS X application, by typing into Terminal:

osascript -e ‘id of app “TaskPaper”’

at this website.

The simplest reference would be of the form:

var ds = Application("TaskPaper").documents()

and from that generic app name reference, you can derive the bundle id of the version installed:

Application("TaskPaper").id()

// e.g. "com.hogbaysoftware.TaskPaper3.direct"

Unless you also have TaskPaper 2 installed, it probably makes sense, now that there is a release version, to just use:

Application("TaskPaper")

If you want to target the release version more narrowly, then:

Application("com.hogbaysoftware.TaskPaper3.direct")