Jump to content
Sign in to follow this  
mitchito

Unable button

Recommended Posts

mitchito

Hi!! :)

How ca I unable a button after pushing it? I have looked for it but I can't find it. Is it possible with AutoIt??

Thanks!!

Share this post


Link to post
Share on other sites
UEZ

What is a unable button? Do you mean enable a button?

And are you talking about your own GUI or from an application's GUI?

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
mitchito

Sorry for my English, I would like to unenable a button (you know, when it turns grey and you can't push it anymore) wich is in my GUI after pushing it

Share this post


Link to post
Share on other sites
UEZ

Something like this:

#include <GUIConstantsEx.au3>

$Form1 = GUICreate("Form1", 196, 163)
$idButton_Test = GUICtrlCreateButton("Test", 40, 16, 115, 81)
$idButton_Enable = GUICtrlCreateButton("Enable", 8, 128, 75, 25)
$idButton_Disable = GUICtrlCreateButton("Disable", 112, 128, 75, 25)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $idButton_Enable
            GUICtrlSetState($idButton_Test, $GUI_ENABLE)
        Case $idButton_Disable
            GUICtrlSetState($idButton_Test, $GUI_DISABLE)
        Case $idButton_Test
            MsgBox(0, "Test", "Test button was pressed!")
    EndSwitch
WEnd

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
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
Sign in to follow this  

×