有没有办法对 Chrome 执行此操作?
tell application "Google Chrome"
return URL of front document as string
end tell
...不起作用。
最佳答案
现在 Chrome (7+) 支持 AppleScript,你可以这样做:
tell application "Google Chrome"
get URL of active tab of first window
end tell
注:“第一个窗口”是指最前面的窗口。
关于google-chrome - 从 OS X 上的 Chrome 获取最前面标签的 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2483033/