ivan Posted August 11, 2006 Share Posted August 11, 2006 (edited) One can easily retreive the state of a control as shown below: I thought it was too basic to post in scripts and scraps, + lots of people come to this forum searching for help, so... Func ControlGetState($pWinHndl, $pCtrlId) Dim $lControlState[3] Local $lState $lControlState[0] = 2 $lState = ControlCommand($pWinHndl, '', $pCtrlId, "IsVisible", "") If $lState = 1 Then $lControlState[1] = 'IsVisible' ElseIf $lState = 0 Then $lControlState[1] = 'IsInVisible' EndIf $lState = ControlCommand($pWinHndl, '', $pCtrlId, "IsEnabled", "") If $lState = 1 Then $lControlState[2] = 'IsEnabled' ElseIf $lState = 0 Then $lControlState[2] = 'IsDisabled' EndIf Return $lControlState EndFunc ;==>ControlGetState oOPS, forgot to say, it retreives both visible and disabled state in a 1 dim array with 3 elements, should really have been 2 but can easily be modified. IVAN Edited August 11, 2006 by ivan Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now