Page 1 of 1

Help me with my project

Posted: 20 Oct 2017, 17:35
by Mightykiller
Hi, I am working on a project i am new in Autohotkey Programming.
So my project is about storing names i type in a box and showing them in a list.
So for example i have 2 boxes
First box is for storing names.
And a list to show all names added.
Second box is for the string i want before every name.
And a button to send the names 1 by 1 with the string before every name.
Lets say i typed in the first box : "Mark" "Kavin" "Roger"
And in the second box i typed "Hello "
i would get:
Hello Mark
Hello Kavin
Hello Roger

i just need some help to start ;)

Re: Help me with my project

Posted: 20 Oct 2017, 21:53
by Delta Pythagorean
Well, you would get the text from the first Edit, and use a loop with a string:

Code: Select all

	Gui, Submit, NoHide
	Loop, Parse, ListEditBox, `n
		NewStr .= BeforeEditText " " A_LoopField "`n"
	MsgBox, % NewStr
This will get all of the items in your list edit and the edit you want before all of the items in the list.

If you'd like to add numbers before every item in the list:

Code: Select all

	Gui, Submit, NoHide
	Loop, Parse, ListEditBox, `n
		NewStr .= A_Index ": " A_LoopField "`n"
	MsgBox, % NewStr