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