Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We are using AppleScript to reveal files from our application in the Finder. If a user has alternatives, e.g., PathFinder, installed as a replacement for Finder, how we can find our what application to tell the AppleScript commands?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You can try using this:

try
    tell application "Path Finder" to reveal "/Users/danielbeck/Downloads"
on error
    tell application "Finder" to reveal folder "Downloads" of home
end try

But this assumes that a user with Path Finder prefers it for the reveal functionality.


Alternatively,

do shell script "open 'file:///Users/danielbeck/Downloads'"

When a user has configured Path Finder to handle file:// URLs, this will open the folder in Path Finder. Only works with folders though.


You can use the following to get a list of processes:

tell application "System Events"
    processes
end tell

Look for a process named Finder. If not found, the user has no running Finder. Or look for one named Path Finder, and if found, use it instead. Etc.

share|improve this answer
    
Unfortunately, configuring Path Finder to handle Reveal actions from other applications doesn't extend to AppleScript. –  Daniel Beck Mar 12 '11 at 8:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.