我想获取Safari 5.1(Mac OS X)网页的内容,并使用Applescript将其粘贴到另一个应用程序中。
我使用AppleScript相对不错,但不是用JavaScript,假设答案在于JavaScript。
我可以使用系统事件来使用击键来选择全部然后复制...这很好用,但我有两个问题:
有人可以帮忙吗?
谢谢,Nic。
答案 0 :(得分:1)
你可以试试这个......
set the webpage_content to ""
tell application "Safari" to set the webpage_content to the text of document 1
tell application "TextEdit"
activate
set the text of the front document to the webpage_content
end tell