ui help

heres what i got

tell application “DragThing”
open register window
tell application “System Events”
tell window “Register DragThing” of process “DragThing”
set text field 1 to “XXXXX”
click button 4
end tell
end tell
end tell

i can see the button be clicked, nothing gets entered into the text field, and once the button clicks nothing happens…what is wrong with this script