07-16-2009, 10:54 AM
Hi njnirmal,
Please check the below LOC. I have taken the Flight Reservation window.
'*******************************************************************
'*******************************************************************
'################
Object Release
'################
Set chld = Nothing
Set chldcln = Nothing
'*******************************************************************
'*******************************************************************
Please let me know if you need any more info.
Please check the below LOC. I have taken the Flight Reservation window.
'*******************************************************************
'*******************************************************************
Code:
Set chld=Description.Create
chld("micclass").value = "WinButton"
Set chldcln = Window("Flight Reservation").ChildObjects(chld)
msgbox chldcln.count
Flag = True
DisBut = 0
For num = 0 to chldcln.count-1
'To highlight the button in the application
chldcln(num).highlight
If chldcln(num).GetRoProperty("enabled") <> True Then
Flag = False
DisBut = DisBut+1
End If
Next
msgbox Flag
If Flag = True Then
msgbox "All the Buttons in the window are enabled."
Else
msgbox "In the Window" & "''" & DisBut & "'' buttons out of ''"& chldcln.count &"'' are disabled."
End If
Object Release
'################
Set chld = Nothing
Set chldcln = Nothing
'*******************************************************************
'*******************************************************************
Please let me know if you need any more info.
Thanks,
SUpputuri
SUpputuri