2016-11-10 36 views
-2

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

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 
+0

这将涉及展示的窗口。你是怎么想这样做的?换句话说:如何做到这一点? – matt

回答

0

如果剪贴板文本,你可以在一个AppleScript对话框中显示其内容:

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

你好,谢谢你的回答。随着菜单项的作品很好,没有错误。对于我所看到的是另一种显示剪贴板的方式。关于剪贴板的内容是用图像或文本修饰的。让我们在Objective-C或Applescript中,或者python – deek5

+0

你好,谢谢你的回答。随着菜单项的作品很好,没有错误。对于我所看到的是另一种显示剪贴板的方式。关于剪贴板的内容是用图像或文本修饰的。让在Objective-C或Applescript或python中 – deek5