制作 osx 模式
我经常使用 applescript,而且我喜欢它。但对于某些工作流程来说,能够进入一种“模式”,在这种模式下,单次击键就可以启动脚本、在对话框中选择选项、与应用程序交互等。我的印象是,单独使用 applescript 是不可能的,但是可以用 Objective-c 实现。我有什么选择?我应该用谷歌搜索什么来开始阅读这个内容?
附言。如果有多个选项,我更喜欢最适合 applescript (或 python)的选项。
I've used applescript a lot, and I love it. But for some workflows it would be really neat to be able to go into a "mode" where single keystrokes would allow me to launch scripts, choose options in dialogs, interact with apps etc. It's my impression that this is impossible with applescript alone but doable with objective-c. What are my options? What do I google to start reading up on this?
PS. If there are several options I'd prefer the ones that work best with applescript (or python).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为最好的方法是学习AppleScriptObjC,你用AppleScript语法编写一个cocoa应用程序。正如 Apple 所说,使用 AppleScriptObjC,您可以用 AppleScript 编写一流的应用程序。如果您没有使用可可的经验,那么使用正确的对象及其方法可能会非常耗时。因此,在您像许多其他人一样认为文档严重缺乏之前,您可以在 Cocoa-Objective-C 文档和示例中找到答案。对于熟悉 AppleScript 的人来说,一本好书是 Shane Stanley 的 AppleScriptObjC 探索,可以在此处找到 http://www.macosxautomation.com/applescript/apps/index.html。
因为你也了解 python,所以你也可以使用 PyObjC,但我没有这方面的经验。
I think the best way is learning AppleScriptObjC, You write an cocoa application with AppleScript syntax. Like Apple says, with AppleScriptObjC you can write first class applications in AppleScript. If you have no experience with cocoa it can be very time consuming job to use the right objects and it's methods. So before you think, like many others, that there is a huge lack of documentation, your answers can be found in the Cocoa-Objective-C documentations and examples. A good book for people who are familiar with AppleScript already is Shane Stanley's AppleScriptObjC explored, that can be found here http://www.macosxautomation.com/applescript/apps/index.html.
Because you know python as well you could use PyObjC as well but I don't have experience with it.