如何使用Applescript显示剪贴板

如何使用Applescript显示剪贴板,applescript,Applescript,我使用applescript的Finder菜单来显示剪贴板。 我想知道其他的东西或方式来显示剪贴板。谢谢你的回答 tell application "System Events" to tell process "Finder" set frontmost to true click menu item "show Clipboard" of menu "Edit" of menu bar 1 end tell 如果剪贴板是文本,则可以在AppleScript对话框中使用以下命

我使用applescript的Finder菜单来显示剪贴板。 我想知道其他的东西或方式来显示剪贴板。谢谢你的回答

tell application "System Events" to tell process "Finder"
    set frontmost to true
    click menu item "show Clipboard" of menu "Edit" of menu bar 1
end tell

如果剪贴板是文本,则可以在AppleScript对话框中使用以下命令显示其内容:

try
    display dialog (get the clipboard)
on error
    display dialog "The clipboard is not text."
end try

这需要显示一个窗口。你是怎么想的?换一种说法:你还会怎么做呢?你好,谢谢你的回答。有了菜单项,它工作得很好,没有错误。就我看来,这是另一种显示剪贴板的方式。关于剪贴板的内容用图像或文本修饰。让我们用Objective-C、Applescript或pythonHello,谢谢你的回答。有了菜单项,它工作得很好,没有错误。就我看来,这是另一种显示剪贴板的方式。关于剪贴板的内容用图像或文本修饰。让我们使用Objective-C、Applescript或python