开发者

How can I copy the contents of an opened TextMate document to the clipboard with AppleScript?

开发者 https://www.devze.com 2023-03-13 00:16 出处:网络
I need to copy the contents of an open TextMate document to the clipboard with AppleScript. Any i开发者_运维知识库deas? Or perhaps an idea for a solution that doesn\'t use AppleScript but accomplishes

I need to copy the contents of an open TextMate document to the clipboard with AppleScript. Any i开发者_运维知识库deas? Or perhaps an idea for a solution that doesn't use AppleScript but accomplishes the same thing programmatically?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消