我在AppleScript字典中看到,当前屏幕上的文本和历史记录缓冲区可以作为属性使用。
如何将当前选择的Terminal.app选项卡中的内容复制到粘贴缓冲区?
我可以在命令行上做吗?
那整个历史记录呢?
发布于 2009-02-10 06:40:14
从命令行复制当前选定Terminal.app的内容:
osascript <<END
tell application "Terminal"
tell front window
set the clipboard to contents of selected tab as text
end
end
END对于历史:
osascript <<END
tell application "Terminal"
tell front window
set the clipboard to history of selected tab as text
end
end
ENDhttps://stackoverflow.com/questions/529143
复制相似问题