确定应用程序响应哪些 AppleScript 命令
是否可以询问 OSX 应用程序它响应哪个 applescript 命令?如果可以,如何实现?
Is it possible to ask an OSX application which applescript commands it responds to, and if so, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要查看应用程序的字典以查看该应用程序支持的所有类和命令。要在 Applescript 编辑器中访问应用程序的词典,请转至
File >打开词典...
。将出现操作系统已知支持 Applescript 的所有应用程序的列表,但操作系统不会捕获所有应用程序,因此您可以使用“浏览”按钮。如果应用程序不支持 Applescript,则无法在对话框窗口中选择该应用程序。需要注意的是,应用程序应该支持某些命令,但实际上并不支持,或者应用程序可能只支持最低要求。这些都非常非常简单,例如
open
、quit
等。您的情况可能会有所不同。You need to look at the Dictionary for an application to see all of the classes and commands the application supports. To get to an application's Dictionary in the the Applescript Editor go to
File > Open Dictionary...
. A list of all the applications that the OS knows supports Applescript will appear, but the OS won't catch them all so you can use the Browse button. If an application doesn't support Applescript, then it won't be selectable in the dialog window.The caveat to this is that there are certain commands that an application is supposed to support but don't, or an application may only support the minimum requirements. These are all very, very simple like
open
,quit
, etc. Your mileage may vary.