Button deaktivieren aktivieren

  • Button deaktivieren aktivieren geht nicht!

    [autoit]


    #include
    #include
    #include
    #include
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 275, 109, 192, 114)
    $btn_goNeu = GUICtrlCreateButton("Button1", 8, 40, 75, 25, $WS_GROUP)
    $Combo1 = GUICtrlCreateCombo("Combo1", 8, 8, 145, 25)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit][autoit][/autoit][autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    case $Combo1
    If $i=1 Then
    GUICtrlSetState($btn_goNeu,$GUI_DISABLE) ; Button deaktivieren
    $i=0
    Else
    GUICtrlSetState($btn_goNeu,$GUI_ENABLE) ; Button aktivieren
    $i=1
    EndIf
    Case $btn_goNeu
    Exit
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit][autoit][/autoit][autoit]

    EndSwitch
    WEnd

    [/autoit]

    2 Mal editiert, zuletzt von gabischatz (27. Februar 2010 um 21:07)

  • kann es sein das da einige befehle durchs posten verloren gegangen sind?

    [autoit]


    Func Ulam($n)
    Return 1
    EndFunc

    [/autoit]


    Rekursion FTW :D

    Einmal editiert, zuletzt von Nathax (30. November 2012 um 21:33)

  • so geht's

    [autoit]

    #include <GUIConstants.au3>
    #Region ### START Koda GUI section ### Form=
    Global $Form1 = GUICreate("Form1", 275, 109, 192, 114)
    Global $btn_goNeu = GUICtrlCreateButton("Button1", 8, 40, 75, 25)
    Global $Combo1 = GUICtrlCreateCombo("Combo1", 8, 8, 145, 25)
    Global $a = ""

    [/autoit][autoit][/autoit][autoit]

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit][autoit][/autoit][autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    case $Combo1
    If $a="" Then
    GUICtrlSetState($btn_goNeu,$GUI_DISABLE)
    $a="a"
    Else
    GUICtrlSetState($btn_goNeu,$GUI_ENABLE)
    $a=""
    EndIf
    Case $btn_goNeu
    Exit
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit][autoit][/autoit][autoit]

    EndSwitch
    WEnd

    [/autoit]

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    über mich...

    ich habe meine Erfahrungen hauptsächlich gesammelt in (grobe Übersicht):

    - RibbonBar Automation
    - MySQL Nutzung
    - GUIs in vielerlei Ausprägung
    - Nutzung von Powershell / Batch in AutoIt
    - Windows Automatisierung

    außerhalb von AutoIt:

    - Sprachen: PS, Batch, php, html(5), javascript, (perl eingeschränkt), vbs
    - Powershell (AD, WPF inkl. Multi-Threading, ...)
    - Deployment-Automatisierung ohne SCCM
    - Office-Nutzung mit COM-Object (AutoIt, PowerShell)
    - ActiveDirectory und alles was damit zusammenhängt
    - Hyper-V Clustering (Converged / Hyper Converged)
    - Serverhardware (Konfiguration, Aufbau, Architektur, Betrieb)

    Lieblingsthema:

    günstige Automatisierung von Vorgängen, für die andere Firmen viel Geld nehmen

    more to come ...