07-16-2009, 03:22 PM
Hi Guys,
The below script would also get you the result, but may not be compatible with all windows application as Iam filtering with the 'value' of Windows Style (which would vary from application to application"). Anyhow here it is............
=======================================
=======================================
The below script would also get you the result, but may not be compatible with all windows application as Iam filtering with the 'value' of Windows Style (which would vary from application to application"). Anyhow here it is............
=======================================
Code:
SystemUtil.Run "calc","","C:\Documents and Settings\Administrator",""
Set obj_AllButtonDesc = Description.Create
obj_AllButtonDesc("Class Name").value = "WinButton"
Set AllButtons = Window("Calculator").ChildObjects(obj_AllButtonDesc)
msgbox AllButtons.count
Set obj_DisButtonDesc = Description.Create
obj_DisButtonDesc("windowstyle").value = "1476395019"
Set DisabledButtons = Window("Calculator").ChildObjects(obj_DisButtonDesc)
msgbox DisabledButtons.count
If AllButtons.count = DisabledButtons.count Then
Msgbox( "All the buttons in your application are currently enabled")
Else
Msgbox( "Few buttons in your application are currently disabled")
End If