I can get the front most application, how do I get the path for the front most document?
Asked
Active
Viewed 715 times
1 Answers
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
-
1Do you know any way to do this without Apple Script, i.e. from other Cocoa application? – Nickolay Olshevsky Mar 28 '15 at 19:51