Store a user's choice in a variable using GUI DropDownList (DDL) Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
HiSoKa
Posts: 480
Joined: 27 Jan 2020, 15:43

Store a user's choice in a variable using GUI DropDownList (DDL)

24 Sep 2021, 04:49

Hello
I have a GUI DropDownList containing numbers,
I want the user after he chooses which number, I want to stored that number in a variable for later use.

And I have another question how i can set the default number that should be when the gui opens

This is what I got after searching and trying

Code: Select all

Gui Add, DDL, , 0.5-5||1-5||2-5||2.5-5||3-5||3.5-5||4-5||4.5-5||5-5
Gui Show, h70, Test
Thanks
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Store a user's choice in a variable using GUI DropDownList (DDL)  Topic is solved

24 Sep 2021, 05:17

You did not read the Docs at all...

1) Gui, Add, DropDownList, vColorChoice, Black|White|Red|Green|Blue
2) To have one of the items pre-selected when the window first appears, include two pipe characters after it (e.g. Red|Green||Blue)

https://www.autohotkey.com/docs/commands/GuiControls.htm#DropDownList
https://www.autohotkey.com/docs/commands/Gui.htm#var
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Panaku, Rohwedder, roysubs and 312 guests