Jump to content

Is there a way to fire the combo box on selection vice the need for the extra action button?


Recommended Posts

I am familiar with the onchange() action available in javascript to fire off the combo box each time you make a change in the combo box selection I have searched by have not found such a command in Auto it... does anyone know how or if this can be done...

#include <GUIConstants.au3>
hotkeyset("{ESC}", "terminate")
GUICreate("TEST1", 400, 400)
GUISetState(@SW_SHOW)
$combo1  =  GUICtrlCreateCombo("Make Selection", 50, 50, 200, 100, 3)
$button = GUICtrlCreateButton("Action" , 50, 250, 50, 20)
GUICtrlSetData($combo1,"Close|Test|Sync|Minimize|Restore" )
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $button
            Local $a = GuiCtrlRead($combo1)
            Select
                case $a = "Close"
                    MsgBox(0,"","Close")
                case $a = "Test"
                    MsgBox(0,"","Test")
                case $a = "Sync"
                    MsgBox(0,"","Sync")
    case $a = "Minimize"
                    MsgBox(0,"","Minimize")
                case $a = "Restore"
                    MsgBox(0,"","Restore")
   EndSelect
    EndSelect
Wend                                  
func terminate()                                                                     ;exit
    Exit 0
EndFunc
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...