View Single Post
Mark FX

Mark FX's Avatar
Member Since: Aug 13, 2011
Location: West Sussex, UK
Posts: 180
Mark FX has a spectacular aura about

Mark FX is offline
Are you using vanilla Applescript, or ApplescriptObjC?

If your using Xcode I will assume your using the ApplescriptObjC language.

First you need to set up a property to represent the TextField at the top of your script
like this.

property myTextField : missing value
then save the file, and then in Interface Builder this property will show up as an IBOutlet in the file object, probably the AppDelegate object if thats where your code is, then drag from this outlet to the TextField in your window, to link this textField to the property.

Then in your IBAction method you can retrieve the text from the TextField like this.

set theText to myTextField's stringValue()
Hope this helps, I wont be able to reply to any other questions until Wednesday.

regards Mark
QUOTE Thanks