分页: 1 / 1

MAC自動化的工具們-大忙人的好幫手

帖子发表于 : 周三 6月 17, 2015 3:33 pm
admin
automator-osx系統自帶
script editor-osx系統自帶

Re: MAC自動化的工具們-大忙人的好幫手

帖子发表于 : 周五 3月 03, 2017 1:18 pm
admin
https://www.macstories.net/tutorials/ge ... -yosemite/
Last month I wrote an article for MacStories on the extensibility and automation changes in OS X Yosemite. The second half was a basic overview of JavaScript for Automation (JXA) (the new addition to OS X scripting languages) joining AppleScript. Before writing that section of the article, I wanted to learn the basics of JXA in order to be sure that I understood what I was writing about and wasn't just blindly summarizing the contents of the JXA release notes and WWDC Session Video.

Since JXA is so new, there obviously was not much information to go by. I've never gotten around to learning AppleScript, so articles based on the classic OS X automation language were not much help either, although I’m not sure how much they would apply anyway. The result was quite a few wasted hours trying to figure out some of the most basic parts of JXA, such as proper syntax of method calls, which method calls worked with which apps, and how to identify UI Elements in order to trigger them with UI automation. Eventually I was able to figure these things out, so now I'm back to share what I learned.