Buttons and Textboxes Help.

I need help with my Buttons and Textboxes. I am using Applescript Studio in Xcode. Now I what I need help with is making it so that I can get information from my textboxes and when you click the button it does something. How would I call information from the textbox when you click the button and make it so that the appllication changes the information, or open the information in another application. Will here is some code.

on clicked theObject
	if title of theObject = "Submit" then
		(*This is where I am having problems with the textbox data*)
		
	else if title of theObject = "Submit" then
		(*This is where I am having problems with the textbox data*)
	end if
end clicked

on action theObject
	(*Add your script here.*)
end action

on drag exited theObject drag info dragInfo
	(*Add your script here.*)
end drag exited

on drag theObject drag info dragInfo
	(*Add your script here.*)
end drag

on conclude drop theObject drag info dragInfo
	(*Add your script here.*)
end conclude drop

on drop theObject drag info dragInfo
	(*Add your script here.*)
end drop

on prepare drop theObject drag info dragInfo
	(*Add your script here.*)
end prepare drop

on drag updated theObject drag info dragInfo
	(*Add your script here.*)
end drag updated

on drag entered theObject drag info dragInfo
	(*Add your script here.*)
end drag entered

on will become active theObject
	(*Add your script here.*)
end will become active

Thanks.

Hi,

AppleScript Studio programming is a bit learning by doing but as well doing by learning :wink:

in /Developer/Examples/AppleScript Studio/ there are lots of examples to study.
Also in the AppleScript part of the Xcode documentation there are a few examples how to use the different handlers

Well yea, I know those are their. But the thing is like I named the first textbox textfield1, I want it to add a URL in front of the ID then open it with Safari so would I put in a

target_textfield1

or something instead of

target_url

? I am new at this :D.
Donovan.

Hi 06Saleen

the below when set up right will load the page which is entered in the text field. ie: http://www.google.co.nz/

on clicked theObject
	if name of theObject is "Submit" then
		set gotPage to contents of text field "textfield1" of window "main" as string
		tell application "Safari"
			make new document with properties {URL:gotPage}
	          end tell
	      end if
end clicked