Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
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:

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?
 

Attachments

  • Picture 2.jpg
    Picture 2.jpg
    155.6 KB · Views: 108
  • Picture 1.jpg
    Picture 1.jpg
    178.5 KB · Views: 100
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.