I am trying to create my 1st GUI. I just started using AHK today and for the most part have found it very simple to use. I am stuck on one thing though. I created this GUI to display buttons and then depending on what is selected certain text will be typed. When I select the button it is typing the correct text, but it is typing it four times. I have taken off one of the buttons, so there were only three, but it would still type it four times. What do I need to do to make sure it only types it once?
MyGUI:
#SingleInstance Force
Gui, +LastFound +AlwaysOnTop
GUI, Add, Button, x10 y10 w75 h25 gClick1, Button &1
GUI, Add, Button, x95 y10 w75 h25 gClick2, Button &2
GUI, Add, Button, x10 y45 w75 h25 gClick3, ButtonS &3
GUI, Add, Button, x95 y45 w75 h25 gClickCancel, &Cancel
GUI, Show, w200 h100,My GUI
Return
Click1:
Send The first button was selected
Gui Hide
Return
Click2:
Send The second button was selected
Gui Hide
Return
Click3:
Send The third button was selected
Gui Hide
Return
ClickCancel:
Send The cancel button was selected
Gui Hide
Return