How to get the application folder from Automator application?

I’ve got a complex Automator workflow that currently has to launch my Psi+. Currently these directories live in a specific location that’s hard coded into the workflow. What I’d like to do is have the workflow be able to reference it’s own package and launch the Psi+ from the same folder.
I’m thinking the most likely way to do it at this point is with AppleScript, and I’ve looked into that a little, and I can find a way to get the location of the workflow itself.

I create new instance of Run AppleScript with this code:

And create instance of Run Shell Script with this:

Turn Pass input of Run Shell Script to “as arguments”
Here is screenshot of my workflow:

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.