使用 Python 代替 AppleScript [英] Using Python in Place of AppleScript
问题描述
我经常使用 Applescript 来完成基本任务,例如打开和关闭程序,有时会更深入一些,例如运行特定 Xcode 程序的单元测试.我正在学习 Python,我喜欢它.我没能找到很多关于 AppleScript 和 Python 的文档.我的问题是:在 Mac OS X 上,可以使用 Python 代替 AppleScript 来完成上述任务吗?如果是这样,有没有人知道可以了解有关该主题的更多信息的好资源?
I often use Applescript to accomplish basic tasks like opening and closing programs, sometimes going a little more in-depth like running a specific Xcode program's unit tests. I'm learning Python, and I love it. I haven't been able to find much documentation relating AppleScript to Python. My question is: On Mac OS X, can Python be used in place of AppleScript to accomplish the tasks mentioned above? And if so, does anyone know of a good resource to learn more about the topic?
推荐答案
Python 不能用于替换 UI &AppleScript 提供的自动化职责.但是,由于 OS X 10.10 (Yosemite) JavaScript 也可以使用.
Python can't be used to replace the UI & automation duties that AppleScript offers. However since OS X 10.10 (Yosemite) JavaScript can also be used.
这篇关于使用 Python 代替 AppleScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!