Find Faceless App

I use this little snippet to find faceless apps that I want to add to my AppleScript Library. Replace “Image Events” with the name of the app you’re interested in. It should work for any app but is only really necessary for faceless ones.

OS version:

set y to null
tell application "Image Events"
	activate
	tell application "System Events" to set my y to (file of process "Image Events")
	tell application "Finder" to open container of (y as alias)
end tell

After reading this article, I thought: the path to command does not work with faceless applications? …
I checked - it works fine:

set theAlias to path to application "Image Events"

Perhaps I misunderstood something?