I'm really struggling to find documentation on how to read a text file into an array using OS X Automation with Javascript.
Here's what I have so far:
var app = Application.currentApplication();
app.includeStandardAdditions = true;
var myFile = "/Users/Me/Dropbox/textfile.txt";
var openedFile = app.openForAccess(myfile, { writePermission: true });
var myText = openedFile.??
app.closeAccess(URLFile);
I copied most of this from the official Apple documentation. I'm finding it really difficult to find documentation anywhere online. For example, what are the arguments for openForAccess? There doesn't seem to be anything in any dictionary to describe that method.
Am I wasting my time with JXA?