OK how come Set contents of text field “MyTextField” of window “MyWindow” to myString works but set contents of text view “MyTextField” of window “MyWindow” to myString doesn’t work?
I get NSRecieverEvaluationScriptError: 4 (1)
My text field wasn’t becoming scrollable when it had enough text to be scrollable even though I had the “Scrollable” check box checked in the inspector window so I changed it to a scrollable text view element.
Remember, that text views are contained within a scroll view. Also, it’s not a good idea to set or get the “contents” of a text view when changing it’s string value. Instead, use “content”. So…
set content of text view "someTextView" of scroll view "someScrollView" of window "someWindow" to myString