如何使用 AppleScript 将打开的 TextMate 文档的内容复制到剪贴板?

发布于 2024-11-15 07:39:33 字数 102 浏览 8 评论 0原文

我需要使用 AppleScript 将打开的 TextMate 文档的内容复制到剪贴板。有什么想法吗?或者也许有一个不使用 AppleScript 但以编程方式完成相同任务的解决方案的想法?

I need to copy the contents of an open TextMate document to the clipboard with AppleScript. Any ideas? Or perhaps an idea for a solution that doesn't use AppleScript but accomplishes the same thing programmatically?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

栩栩如生 2024-11-22 07:39:33
tell application "TextMate" to set x to path of document 1
set the clipboard to x

我认为当前文档的内容会有一个像 TM_CURRENT_LINE 这样的环境变量,但是 显然不是

tell application "TextMate" to set x to path of document 1
set the clipboard to x

I thought there'd be an environment variable like TM_CURRENT_LINE for the contents of the current document, but apparently not.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文