JXA Tips and References

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

Library

How to Open Script Automation enable apps Dictionary

  1. Open Script Editor app
  2. File -> Open Dictionary -> Choose an target app

You can even open the dictionary of StandardAddtions.

 

Run JS/JS from node

 

Chrome

 

Reference

 

Tutorial/Getting Started-ish documents

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s