Accessing the contents of a window via Applescript


#1

Hi all. New to forum.

I had a mind to get and set the text of an Atom window/document using Applescript to see if I could create a means of using Atom as a Livecode Script Editor, but it seems that text is not a property of either a window or a document. In fact, I cannot find anywhere where text is the property of anything. How would I get the contents of an open window from an applescript, if possible?

Bob S


#2

If I remember correctly, AppleScript uses the accessibility hooks to reach elements of an application? I don’t think any work has been done to integrate Atom into those hooks.


#3

Thanks for the reply. Oddly, there is a dictionary, so support for Applescript is at least a consideration. You can get the text of a textedit document. That one addition would allow me to create a kind of daemon for getting Livecode scripts into and out of Atom. Or any dev environment for that matter.