1

I can get the front most application, how do I get the path for the front most document?

overboming
  • 1,502
  • 1
  • 18
  • 36

1 Answers1

2

There isn't a way to do this for any app. Apps don't always have documents. If an app supports the standard AppleScript document model, you can do it with AppleScript. For example,

tell application "TextEdit"

    set foo to the path of the first document

end tell
Ken Aspeslagh
  • 11,484
  • 2
  • 36
  • 42