I ca开发者_开发知识库n get the front most application, how do I get the path for the front most document?
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
精彩评论