Jump to content

Search the Community

Showing results for tags 'how to tell which is selected'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I have a list that fills a combo box. Instead of "GUICtrlRead($SomeRandomBox)" returning the value of the data in the box, I would like it to return the position in the list. In that example, the below code would return '2' not "second". #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $msg GUICreate("My GUI combo") ; will create a dialog box that when displayed is centered GUICtrlCreateCombo("", 10, 10) ; create first item GUICtrlSetData(-1, "First|Second|Third", "Second") ; add other item snd set a new default GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd EndFunc ;==>Example I am trying to avoid: If GUICtrlRead($SomeRandomBox) = "First" Then $Value = 1 If GUICtrlRead($SomeRandomBox) = "Second" Then $Value = 2 I am guessing there is an easier way, since the list will grow.
×
×
  • Create New...