Jump to content

How to use GUICtrlSetState


RickieHubbs
 Share

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...