click text field

delay 1
set timeoutSeconds to 2.0
set uiScript to "click text field 1 of group 41 of UI Element 1 of scroll area 1 of group 2 of window \"main de1\" of application process \"Safari\""
my doWithTimeout(uiScript, timeoutSeconds)

on doWithTimeout(uiScript, timeoutSeconds)
	set endDate to (current date) + timeoutSeconds
	repeat
		try
			run script "tell application \"System Events\"
" & uiScript & "
end tell"
			exit repeat
		on error errorMessage
			if ((current date) > endDate) then
				error "Can not " & uiScript
			end if
		end try
	end repeat
end doWithTimeout

I used virtual automator to generate this script.
I can make scripts like that that click anything, but it won’t click text fields.

please help me
thank you

Instead of click text field . try set value of attribute “AXFocused” of text field . to true.

Model: iBook G4 933
AppleScript: 1.10.7
Browser: Safari 3.0.4 (523.12)
Operating System: Mac OS X (10.4)