Combo box with input Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
shadad
Posts: 32
Joined: 23 Jun 2018, 05:21

Combo box with input

19 Nov 2018, 04:27

Hi there,

am trying to achieve a GUI with comboBox with Edit. just like the window below for the VNC Viewer app. saving only 5 records on the list and sending a msg box saying the selection i chose or i wrote. i want to be able either to select from the menu or input my record. also i want to be able in case i entered a record to overwrite the records so it delete the outdated record and replaced it with the new i entered.

I have my simple code but dont know how to use the (ComboBox) and (IniRead, readfile)the on it correctly. maybe anyone can assist me???

Code: Select all

Gui, Add, Text,,Operator Name

Gui, Add, ComboBox, vCB, name1|name2|name3|name4

Gui, Add, Button, Default, Save

Gui, Add, Button, x+10, Close



Gui, Show,,Operator Name

return

ButtonClose:

GuiClose:

ExitApp



ButtonSave:

Gui, Submit, NoHide

FileAppend, %CB%`n, operator.csv

return


Image
colt
Posts: 291
Joined: 04 Aug 2014, 23:12
Location: Portland Oregon

Re: Combo box with input  Topic is solved

19 Nov 2018, 10:14

You may want to do a sort on the combo box items to make the list easier to read.

Code: Select all

Gui, Add, Text,,Operator Name

IniRead, cbList, list.ini, list, list ,name1|name2|name3|name4

Gui, Add, ComboBox, vCB, %cbList%

Gui, Add, Button, Default, Save

Gui, Add, Button, x+10, Close



Gui, Show,,Operator Name

return

ButtonClose:

GuiClose:

ExitApp



ButtonSave:

Gui, Submit, NoHide

cbList:= StrReplace(cbList, "||" , "|")

cbList .= "|" . CB . "||"

IniWrite, %cbList%, list.ini, list, list

;msgbox %cbList%

guiControl , ,CB,|%cbList%

FileAppend, %CB%`n, operator.csv

return
shadad
Posts: 32
Joined: 23 Jun 2018, 05:21

Re: Combo box with input

20 Nov 2018, 23:52

colt wrote:
19 Nov 2018, 10:14
You may want to do a sort on the combo box items to make the list easier to read.

Code: Select all

Gui, Add, Text,,Operator Name

IniRead, cbList, list.ini, list, list ,name1|name2|name3|name4

Gui, Add, ComboBox, vCB, %cbList%

Gui, Add, Button, Default, Save

Gui, Add, Button, x+10, Close



Gui, Show,,Operator Name

return

ButtonClose:

GuiClose:

ExitApp



ButtonSave:

Gui, Submit, NoHide

cbList:= StrReplace(cbList, "||" , "|")

cbList .= "|" . CB . "||"

IniWrite, %cbList%, list.ini, list, list

;msgbox %cbList%

guiControl , ,CB,|%cbList%

FileAppend, %CB%`n, operator.csv

return
thanks man ! :)

i will work on the sort thing now.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada and 229 guests