Listbox

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sbrady19
Posts: 348
Joined: 12 Apr 2018, 05:22
Location: Central Florida
Contact:

Listbox

24 May 2024, 15:35

here is code for ListBox from a post somewhere, its not working.
can anyone help me get this to work.
I need to be able to set the name of the selection, so I can trigger more code to do something.

Code: Select all

Gui Add, ListBox, w400 r5 vMyListBoxVariable gMyListBoxLabel, One|Two|Three|Four|Five
Gui Show, , ListBox
Return
GuiClose:
ExitApp

MyListBoxLabel:
GuiControlGet ItemText, , MyListBoxVariable
GuiControl +AltSubmit, MyListBoxVariable
GuiControlGet ItemIndex, , MyListBoxVariable
GuiControl -AltSubmit, MyListBoxVariable
MsgBox 0, %MyListBoxVariable%, You selected the item with index %ItemIndex% and text %ItemText%
Return
gregster
Posts: 9114
Joined: 30 Sep 2013, 06:48

Re: Listbox

24 May 2024, 15:40

I moved your topic from AHK v2 help since this is clearly v1 code. But I see that you have another, very similar listbox topic in the v2 help forum.
So I am not sure if you are actually looking for v1 help. 🤷‍♂️ On the other hand, if you are looking for v2 help, why not continue your other topic...?
sbrady19
Posts: 348
Joined: 12 Apr 2018, 05:22
Location: Central Florida
Contact:

Re: Listbox

24 May 2024, 16:03

sorry for wrong category, its a v2 coding issue
was hoping to get more hits I guess.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 358 guests