Jump to content

Combo box item as function key?


 Share

Recommended Posts

This should get you started:

#include <GUIConstants.au3>

Opt("GUIOnEventMode", True)

$testGUI = GUICreate("Combo Example")
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")

$combo = GUICtrlCreateCombo("", 10, 10, 150, -1, $CBS_DROPDOWNLIST)
GUICtrlSetData($combo, "1|2|3|4|5", "1")
GUICtrlSetOnEvent($combo, "ComboFunc")

GUISetState()

While 1
    Sleep(10)
WEnd

Func ComboFunc()
    MsgBox(0, "Selection", "You selected: " & GUICtrlRead($combo))
EndFunc

Func Terminate()
    Exit 0
EndFunc
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

Hi. I need help.

I would like to make a script that will perform a function when u select a diferent option from ComboBox, but I don't know how to, can anyone help me?

Show some code to create the demo GUI and a combo box. You'll get lots of help...

;)

Edit: Hrumph... mikehunt114 is still stuck on the "Give a man a fish" part...

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Just giving him a place to start PSalty, heh.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...