0.4.4 • Published 1 year ago

nodeautomation v0.4.4

Weekly downloads
13
License
Public Domain
Repository
github
Last release
1 year ago

README

NodeAutomation is a Node.js module that allows 'AppleScriptable' applications to be controlled directly from JavaScript.

For example, to get the value of the first paragraph of the document named 'README' in TextEdit:

app('TextEdit').documents.named('README').paragraphs[0].get()

This is equivalent to the AppleScript statement:

tell application "TextEdit" to get paragraph 1 of document "README"

Or to create a new "Hello World!" document in TextEdit:

app('TextEdit').make({new: k.document, 
                      withProperties: {text: "Hello World!"}})

Dependencies:


Documentation:

Documentation is preliminary, being a quick and dirty translation of the original appscript manual. Documentation is included in the nodeautomation package and online:

https://hhas.github.io/nodeautomation/

ASDictionary and ASTranslate tools:

https://sourceforge.net/projects/appscript/files/


Caution: This is an alpha release. There will be bugs and rough edges.

E&OE. No warranty given. Use at own risk. Etc.

See also: http://appscript.sourceforge.net/status.html


Test:

$ node
> require('nodeautomation/repl')
> const finder = app('Finder')
> finder.home()
app('Finder').startupDisk.folders.named('Users').folders.named('jsmith')

Known issues:

Relies on several now-deprecated CoreServices/Cocoa functions/methods for which macOS does not provide replacements.

0.4.4

1 year ago

0.4.3

1 year ago

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

7 years ago

0.1.0

7 years ago