Hi guys
I would like to create a GUI that has 4 actions in it, but so far I can only get it to send text.
I want the user to click on each option and then instantly the GUI closes and does an action, such as launch an App, or Run, or FileCopy.
Any help would be appreciated.
Thanks!
How to Make a GUI with Commands?
- LanceDaoust
- Posts: 9
- Joined: 06 Jan 2017, 14:14
- Location: Canada
- Contact:
How to Make a GUI with Commands?
THIS IS ME:
Re: How to Make a GUI with Commands?
Create buttons for each option/task you need for your GUI.
Add a g-label to each button.
In the g-label subroutine set the things you want to be executed.
That's about it, I guess.
Everything is explained very well in the documentation.
https://autohotkey.com/docs/commands/index.htm
Succes
Tup
Add a g-label to each button.
In the g-label subroutine set the things you want to be executed.
That's about it, I guess.
Everything is explained very well in the documentation.
https://autohotkey.com/docs/commands/index.htm
Succes
Tup
- LanceDaoust
- Posts: 9
- Joined: 06 Jan 2017, 14:14
- Location: Canada
- Contact:
Re: How to Make a GUI with Commands?
Thanks for that, it puts me in a different direction than I was on. If I had an example of how to create a button and its subroutine I would be able to keep going; I am not good without examples. Could you show me a mock-up, or point me to one, please?Tup wrote:Create buttons for each option/task you need for your GUI.
Add a g-label to each button.
In the g-label subroutine set the things you want to be executed.
That's about it, I guess.
Everything is explained very well in the documentation.
https://autohotkey.com/docs/commands/index.htm
Succes
Tup
THIS IS ME:
- LanceDaoust
- Posts: 9
- Joined: 06 Jan 2017, 14:14
- Location: Canada
- Contact:
Re: How to Make a GUI with Commands?
Here's an example of what I think you're talking about. I will customize this now:
Code: Select all
F19::
gui, add, button, x5 y5 h20 w70 gsub1, Subroutine 1 ;these buttons use g-labels to define a subroutine to act on.
gui, add, button, x5 y30 h20 w70 gsub2, Subroutine 2
gui, show, w80
return
sub1: ;when creating the subroutine remember to leave off the g.
{
msgbox, You clicked the first button!
}
return
sub2:
{
msgbox, You clicked the Second button!
}
return
return
THIS IS ME:
Re: How to Make a GUI with Commands?
Is this what you needed?
(your smiley stills look a little puzzled)
Need more help?
(your smiley stills look a little puzzled)
Need more help?
- LanceDaoust
- Posts: 9
- Joined: 06 Jan 2017, 14:14
- Location: Canada
- Contact:
Re: How to Make a GUI with Commands?
Actually, you put me on the right track! I have made much more progress with your method than what I was working with before. The confused smiley is my signature, lolTup wrote:Is this what you needed?
(your smiley stills look a little puzzled)
Need more help?
THIS IS ME: