system events click

so I have a script that check to see if a button exists and if it does to click it clearing the dialog i do this using system events

on my local machine runing 10.4.6 this works fine when I put it on another machine running 10.3.9 I can physically see the button get click however the dialog does NOT go away does anyone have any idea what is causing this and if there is anything I can do to fix it ?

well I got a work around instead

previous code was this

tell application "System Events"
	if exists button "Cancel" of window 1 of application process "InDesign 2.0.2" then
		click button "Cancel" of window 1 of application process "InDesign 2.0.2"
	end if
end tell

new code

tell application "System Events"
	if exists button "Cancel" of window 1 of application process "InDesign 2.0.2" then
		keystroke "." using command down
	end if
end tell

thanks anyway