Tips
Introspection
Object.entireContents() Object.properties() Object.attributes() |
StandardAdditions
currentApp = Application.currentApplication() currentApp.includeStandardAdditions = true |
JS <-> AS Interoperability
Can AppleScript(AS) call JavaScript(JSX) library function/APIs? -> Yes
Can JavaScript(JSX) call AS library function/APIs? -> Yes
- http://macscripter.net/viewtopic.php?id=44494
- http://qiita.com/zakuroishikuro/items/96a55871517e254c0185
Library
- http://www.macosautomation.com/mavericks/libraries/index.html
- https://github.com/mugginsoft/ASDictionaryDocs
- http://www.mugginsoft.com/AutomationDocs
How to Open Script Automation enable apps Dictionary
- Open Script Editor app
- File -> Open Dictionary -> Choose an target app
You can even open the dictionary of StandardAddtions.
Run JS/JS from node
Chrome
- http://qiita.com/syui/items/d3c0721de71ebbe6461e
- http://www.mugginsoft.com/html/kosmictask/ASDictionaryDocs/Google/Google-Chrome/OS-X-10.7/Google-Chrome-19.0.1084.56/html/
Reference
- Apple Developer site: https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/Introduction.html
- Mac Scripting Essentials: https://developer.apple.com/library/mac/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html#//apple_ref/doc/uid/TP40016239
- JXA Cookbook: https://github.com/dtinth/JXA-Cookbook/wiki
- JXA Samples: http://www.openspc2.org/reibun/JXA/Yosemite/
- Mac OS X Automation: http://macosxautomation.com/applescript/index.html
- Cocoa Support for Scriptable Applications: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_about_apps/SAppsAboutApps.html#//apple_ref/doc/uid/TP40001976-BBCBCIJE
Tutorial/Getting Started-ish documents