RickieHubbs Posted December 6, 2018 Share Posted December 6, 2018 Hi there I'm very new to Autoit and cant figure something out. I want to use GUICtrlSetState to get the state of a button ($Button1) if its enabled or disabled and then disable it if its enabled if $iMode = 1 If $iMode = 1 Then Global $hstate = GUICtrlGetState($Button1) If $hstate = @GUI_ENABLE)Then GUICtrlSetState($Button1, $GUI_DISABLE) EndIf what am I doing wrong? Sorry if its a simple question but literally just starting out and learning how i go, couldn't find the answer in the help file. Thanks Very Much Link to comment Share on other sites More sharing options...
Subz Posted December 6, 2018 Share Posted December 6, 2018 Try If BitAND(GUICtrlGetState($Button1), $GUI_ENABLE) = $GUI_ENABLE Then GUICtrlSetState($Button1, $GUI_DISABLE) Skysnake 1 Link to comment Share on other sites More sharing options...
RickieHubbs Posted December 6, 2018 Author Share Posted December 6, 2018 Thank you so much Subz, That's exactly what i wanted worked like a charm. Thanks Again 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