 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ljose
Joined: 11 Sep 2009 Posts: 7
|
Posted: Tue Feb 16, 2010 6:21 am Post subject: GUI button |
|
|
Hi,
Here is small script that creates a GUI window with a 'DONE' button. I would like the user to click on 'DONE' to exit the GUI.
But the GUI doesn't seem to be working normally. The button does not appear in the GUI.
| Code: |
Gui, Font, S10 CDefault Bold, Verdana
Gui, Add, Text, x36 y20 w390 h40 +Center, Text1
Gui, Add, Text, x36 y70 w390 h20 +Center, Text2
Gui, Add, Text, x36 y100 w390 h60 +Center, Text3
Gui, 9:Add, Button, x176 y180 w100 h30 +Center vext_doneu gext_doneu, Done
Gui, Show, w477 h226,
ext_doneu:
Gui, 9: Destroy
Return |
_________________ Leo
http://www.einfochips.com |
|
| Back to top |
|
 |
porrasnick
Joined: 30 Jan 2010 Posts: 166
|
Posted: Tue Feb 16, 2010 6:33 am Post subject: |
|
|
| Code: | Gui, Font, S10 CDefault Bold, Verdana
Gui, Add, Text, x36 y20 w390 h40 +Center, Text1
Gui, Add, Text, x36 y70 w390 h20 +Center, Text2
Gui, Add, Text, x36 y100 w390 h60 +Center, Text3
Gui, Show, w477 h226,
Gui, 9:Add, Button, x176 y180 w100 h30 +Center vext_doneu gext_doneu, Done
Gui, 9:Show
Return
ext_doneu:
Gui, 9: Destroy
Return |
|
|
| Back to top |
|
 |
jballi
Joined: 01 Oct 2005 Posts: 748 Location: Texas, USA
|
Posted: Tue Feb 16, 2010 6:43 am Post subject: |
|
|
Not quite. Your code is actually creating two windows. GUI 1 (the default) and GUI 9. Either add 9: to all of the GUI statements or get rid of of the 9: from the two statements. Something like this:
| Code: | Gui, Font, S10 CDefault Bold, Verdana
Gui, Add, Text, x36 y20 w390 h40 +Center, Text1
Gui, Add, Text, x36 y70 w390 h20 +Center, Text2
Gui, Add, Text, x36 y100 w390 h60 +Center, Text3
Gui, Add, Button, x176 y180 w100 h30 +Center vext_doneu gext_doneu, Done
Gui, Show, w477 h226,
return
ext_doneu:
Gui Destroy
ExitApp
Return
|
I hope this helps. |
|
| Back to top |
|
 |
porrasnick
Joined: 30 Jan 2010 Posts: 166
|
Posted: Tue Feb 16, 2010 6:47 am Post subject: |
|
|
| i figured that's what he wanted, since he added the Gui, 9:... command in there in the first place |
|
| Back to top |
|
 |
ljose
Joined: 11 Sep 2009 Posts: 7
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|