I am a beginner to applescript studio and I have built an interface that looks like the image below. What I want is to write any text into the big box and save it as a text file into into the path that is specified in the text field above.
Anyway, I saw that I couldn't make it work, so I tried something simpler. I tried to make the big box display "Hello" when I click the OK button. That didn't work either. Instead, I get a message "NSReceiverEvaluationScriptError: 4 (1)". I use this command to make the text appear in the text box:
I saw the applescript studio examples, and other things, and still, I can't figure out why I get this error.
What am I doing wrong?
Anyway, I saw that I couldn't make it work, so I tried something simpler. I tried to make the big box display "Hello" when I click the OK button. That didn't work either. Instead, I get a message "NSReceiverEvaluationScriptError: 4 (1)". I use this command to make the text appear in the text box:
Code:
on clicked theObject
if name of theObject = "Do" then
set contents of text view "text1" of scroll view "text1" of window "WindowMain" to "hello"
end if
end clicked
I saw the applescript studio examples, and other things, and still, I can't figure out why I get this error.
What am I doing wrong?