Setting value of a text box

Within AppleScript Studio, how do you set the default value of a text box from AppleScript? I mean, not just setting the initial value from within Interface Builder, but actually controlling the value from AppleScript.


~ Tom

Hi Tom,

You might not get any responses to this post because it’s to simple. People don’t want to waste their time when posters post questions that they themselves can read in the documents. Look at the documentation and post questions after you have tried something. A good question might be, what documentation can I read to learn about AppleScript Studio?

Edited: or you might post something like: are there any examples of setting the text of a text field or text view. There should be one in the AppleScript Studio examples.

Anybody can tell you how to do something, but you can’t catch a fish if you got the wrong bait.


hoo, wait a minute

I made some wring philosophical projections.

You can catach fish with the wrong bait., but that’s not the point.

Hi SirThom,

Kel is absolutely right but just so you will not feel very discouraged about this forum, here’s a little bonus help.

Assuming that you have a text field named “myTextField” in the window “main”, for example, and you want to set the content to some pre-determined text value, simply add this statement to your code.

set the content of text field  "myTextField" of window "main" to "Thanks for the help anyway.."

In case there is slight error in the syntax, you should be able to figure it out.

Now, you may keep those books and other AppleScript Studio references worth every penny if you are buying them.

Good luck!

archseed :slight_smile:

Ah, I apologize. Thanks for the info.