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
[Help]Small Project
-
- Posts: 57
- Joined: 09 Oct 2017, 13:34
Re: [Help]Small Project
Check out GUI. You'll want to Add two Edit controls and a Button. Each of them should have vControlName that You can refer to after Submit or with GuiControlGet. Lastly, You'll want to StrSplit (use StrSplit()) the name list, and for-loop each array element add the thing from second box beforehands when displaying.
Use
Code: Select all
[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
Re: [Help]Small Project
Most of the code I took from sjc1000 https://autohotkey.com/board/topic/8481 ... t-boxloop/
Gui, Add, Edit, w200 h200 vEdit
Gui, Add, Edit, w200 h20 vEditt
Gui, Add, Button, w100, OK
Gui, Show
return
ButtonOK:
Gui, Submit, NoHide
Loop, Parse, Edit, `n
{
Line%A_Index% = %A_LoopField% ; Put it into Line%A_Index% ( Line1, Line2, Line3, Line4 etc.)
MsgBox, % Editt " " Line%A_Index%
}
Return
Gui, Add, Edit, w200 h200 vEdit
Gui, Add, Edit, w200 h20 vEditt
Gui, Add, Button, w100, OK
Gui, Show
return
ButtonOK:
Gui, Submit, NoHide
Loop, Parse, Edit, `n
{
Line%A_Index% = %A_LoopField% ; Put it into Line%A_Index% ( Line1, Line2, Line3, Line4 etc.)
MsgBox, % Editt " " Line%A_Index%
}
Return
-
- Posts: 57
- Joined: 09 Oct 2017, 13:34
Re: [Help]Small Project
Ok so i made this
but its not working...
I need to add something to add the names from vVouch to the ListBox using the Add to list button
And if i press Vouch button i want the project to sendinput a string + name + vReason
And what should i add if i wanted it to sendinput to another running software
but its not working...
I need to add something to add the names from vVouch to the ListBox using the Add to list button
And if i press Vouch button i want the project to sendinput a string + name + vReason
And what should i add if i wanted it to sendinput to another running software
Code: Select all
Gui +Resize
Gui Add, Tab3, x0 y0 w600 h400, Vouch|Ban
Gui Tab, 1
Gui Add, Text, x45 y76 w40 h23 +0x200, Reason:
Gui Add, Edit, x88 y79 w120 h21 vVouch
Gui Add, Button, x281 y52 w80 h23, &Add to list
Gui Add, Button, x124 y117 w80 h23, &Vouch all users
Gui Add, Button, x219 y52 w55 h23, Vouch
Gui Add, ListBox, x49 y191 w121 h251
Gui Add, Edit, x88 y52 w120 h21 vReason
Gui Add, Text, x20 y50 w66 h23 +0x200, Display name:
Gui Add, Text, x33 y119 w57 h23 +0x200, List of users
Gui Show, w600 h400, Project
Return
ButtonVouch:
Gui, Submit, NoHide
Loop, Parse, vVouch, `n
{
Line%A_Index% = %A_LoopField% ; Put it into Line%A_Index% ( Line1, Line2, Line3, Line4 etc.)
MsgBox, % vReason " " Line%A_Index%
}
Return
GuiSize:
If (A_EventInfo == 1) {
Return
}
Return
GuiEscape:
GuiClose:
ExitApp
-
- Posts: 57
- Joined: 09 Oct 2017, 13:34
Re: [Help]Small Project
This is the preview of my project.
Re: [Help]Small Project
In Gui commands, specify vVouch to create variable Vouch, and vvVouch to create variable vVouch.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: No registered users and 313 guests