Use the File > Open menu to open selected text

In my ASS app, a list of paths to certain files appear in a window. I can select one, go to the Services menu, choose Finder, then choose open, and viola, the file opens. How can I get the File > Open menu to perform the same function? It is greyed out, and I can’t find the handler for it in my script. Anyone have a nice example, the Applescript Studio examples seem pretty bare when it comes to menus.

What you want is:

tell application "Finder" to open (the_item as alias)

or, to reveal it:

tell application "Finder" to reveal (the_item as alias)

If it’s a POSIX path, you can also use a shell script:

do shell script "open " & quoted form of the_item

As an example of this, see my dropper sample project that allows you to make a selection in a table and then reveal the file using the Finder.

Jon

Well, it’s really “the_item” that’s in question here. I have a bunch of files listed, all posix paths in a textview window in my ASS application. I can select each item by double clicking it. How do I set “the_item” to “selection of the line in textview window…”

Also, I know how to tell the Finder to open the item, or how to use “do shell script” to open it. What I would like to do is tell the “Open” Menu Item of the “File” menu to open trigger the action. How I need help with menus in ASS. Any good examples of menus commands out there, like a help menu example?