Jump to content

How to Gui Createed with combo box, need to read data from combo box slection. Help Plz - (Moved)


Recommended Posts

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Engr. Ashraful\Videos\koda_1.7.3.0\Forms\ProgramPlayer\FormProgamToOpen.kxf
$FormInput = GUICreate("Input", 302, 205, 454, 285)
$Resolution = GUICtrlCreateCombo("Resolution", 80, 24, 145, 25)
GUICtrlSetData(-1, "1920|VM1920|1366")
$ComboProgramType = GUICtrlCreateCombo("Program Type Selection", 80, 64, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Multimedia|Official|Design|Web")
$ButtonEnter = GUICtrlCreateButton("Enter", 104, 104, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

please help me to read combo box input and use the value for another function/ work

 

Link to comment
Share on other sites

Top comment is the 1st gui, under this: 

1: When Multimedia selected and pressed enter this form will open and will ask for next input. other option also have same, if i am able to complete this one then i will try apply for all other options.

 

Thanks in advance

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Engr. Ashraful\Videos\koda_1.7.3.0\Forms\ProgramPlayer\FormInput.kxf
$FormProgramToOpen = GUICreate("Open Under Multimedia", 285, 181, 274, 79)
$ComboProgramToOpen = GUICtrlCreateCombo("ProgramToOpen", 72, 24, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "VLCPlayer|WindowsMediaPlayer|KMPlayer")
$ButtonRunProgram = GUICtrlCreateButton("Run Program", 88, 72, 99, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

Link to comment
Share on other sites

36 minutes ago, ashraful089 said:

please help me to read combo box input and use the value for another function/ work

Do you mean something like this ?

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Local $FormInput, $Resolution, $ComboProgramType, $ButtonEnter
Local $idResSelecteted, $idTypeSelecteted
$FormInput  = GUICreate("Input", 302, 205, 454, 285)
$Resolution = GUICtrlCreateCombo("Resolution", 80, 24, 145, 25)
GUICtrlSetData(-1, "1920|VM1920|1366")
$ComboProgramType = GUICtrlCreateCombo("Program Type Selection", 80, 64, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Multimedia|Official|Design|Web")
$ButtonEnter = GUICtrlCreateButton("Enter", 104, 104, 75, 25)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $ButtonEnter
            $idResSelecteted  = GUICtrlRead($Resolution)
            $idTypeSelecteted = GUICtrlRead($ComboProgramType)
            MsgBox(0, "Selection" , $idResSelecteted & @CRLF & $idTypeSelecteted)

    EndSwitch
WEnd

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

  • Developers

Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers
43 minutes ago, ashraful089 said:

please pardon and suggest me, where to post

It is already move to the correct Place. 😉

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

×
×
  • Create New...