some stuff [name of button]

ok heres what i got and such

on clicked theObject
	if title of theObject = "startbutton" then
		start progress indicator "spinner" of window 1
		
		set actName to contents of text field "nameBox" of window 1
		
		set msgTxt to contents of text field "msgBox" of window 1
		
		set nTime to contents of text field "timeBox" of window 1
		
		
		tell application "iChat"
			activate
			
			repeat nTime times
				send (msgTxt) to account (actName)
			end repeat
		end tell
		stop progress indicator "spinner" of window 1
		
		
		
	else if title of theObject = "stopbutton" then
		exit repeat
		
		
		
	else if title of theObject = "dc" then
		tell application "System Events"
			tell application "iChat" to activate
			keystroke "m" using {command down, option down, shift down}
		end tell
	end if
	
	
end clicked

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

now the problem is that the buttons dont work seperatly and the end repeat wont work
any thoughts?

i was also thinking about implementing this http://bbs.applescript.net/viewtopic.php?id=12582 anyidea how to do this

also id like to tank you for helping me inadvance all feeback here has been so helpful to me in the past

here is a screenshot of the interface http://img168.imageshack.us/img168/2097/picture1sz2.png

title is the visible text on the button; You probably want name.

thanks each button works now!

this is just an app to get used to working with xcode/Applescript studio so yea thanks
!