I have a button control as below screen.
This one I am able to suppress using below code in all the OS.
But on server 2008, sometimes the button highlighted in the image is not getting clicked and some times it is working.
I have cross checked the IDs when it is not working, but it is working only.
$win1 = "erwin Mart Configuration"
$MartConfigWindow = _WinWaitActivate1($win1,"Database Details")
ControlSetText($MartConfigWindow, "", "WindowsForms10.EDIT.app.0.378734a6", $dbserver)
ControlSetText($MartConfigWindow, "", "WindowsForms10.EDIT.app.0.378734a4", $dbname)
ControlSetText($MartConfigWindow, "", "WindowsForms10.EDIT.app.0.378734a9", $dbuser)
ControlSetText($MartConfigWindow, "", "WindowsForms10.EDIT.app.0.378734a8", $dbpassword)
;Button clicl logic
$iControlClickStatus = ControlClick($MartConfigWindow, "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]")
;If above button click fails, trying with mouse click on the control
if ControlFocus($MartConfigWindow, "", "WindowsForms10.BUTTON.app.0.378734a2")=1 then ;sometimes above button fails in win server 2008,so this loop
Send("{ENTER")
EndIf
Any suggestion on how to resolve this.?