ListBox select item and move down Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tm6464
Posts: 48
Joined: 17 Jul 2017, 22:56

ListBox select item and move down

28 Nov 2019, 15:06

hi guys
i make listbox with

Code: Select all

Loop,Read,ip.txt
	ListVar .= (A_Index == 1 ? "" : "|") . A_LoopReadLine
Gui, Add, ListBox, x16 y7 w150 h180 , %ListVar%
how i can select first item and copy it to variable

and then move down and select next

thx a lot
User avatar
flyingDman
Posts: 2848
Joined: 29 Sep 2013, 19:01

Re: ListBox select item and move down  Topic is solved

28 Nov 2019, 16:25

try this:

Code: Select all

filedelete, ip.txt
fileappend, abc`ndef`nghi,ip.txt

Loop,Read,ip.txt
	ListVar .= (A_Index == 1 ? "" : "|") . A_LoopReadLine
Gui, Add, ListBox, x16 y7 w150 h180 choose1 vmylist, %ListVar%
gui,show

gui,submit,NoHide
msgbox % mylist

GuiControl, Choose, mylist, 2
gui,submit,NoHide
msgbox % mylist

GuiControl, Choose, mylist, 3
gui,submit,NoHide
msgbox % mylist
14.3 & 1.3.7
tm6464
Posts: 48
Joined: 17 Jul 2017, 22:56

Re: ListBox select item and move down

28 Nov 2019, 17:20

thx sir u help me a lot

i have little modify it couse my list is very long

Code: Select all

Loop,Read,ip.txt
	ListVar .= (A_Index == 1 ? "" : "|") . A_LoopReadLine
Gui, Add, ListBox, x16 y7 w150 h180 choose1 vmylist, %ListVar%
gui,show

gui,submit,NoHide
msgbox % mylist


loop, 1000
{
GuiControl, Choose, mylist, %A_Index%
gui,submit,NoHide
tooltip % mylist
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Hansielein, Lpanatt and 314 guests