Get Open File's Name

Have you seen the huge Pro Tools thread? Especially this post, where @Fokke seemed to have success with an Accessibility AppleScript.
The macros are posted in the follow-up posts.