 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
mAdDoG
Joined: 29 Dec 2004 Posts: 65
|
Posted: Mon Mar 07, 2005 11:13 pm Post subject: Need Gui button help... |
|
|
Hi guys-
How can I make a "Next" button work for multple Gui's within a script?
| Code: |
HoleType:
Gui, Add, Radio, vHole_Type Checked x166 y20 w60 h30, Drilled
Gui, Add, Radio, x166 y60 w60 h30, Tapped
Gui, Add, Radio, x166 y100 w60 h30, Reamed
Gui, Add, Button, x246 y60 w40 h30, Next
Gui, Show, h144 w300, Hole Type
Gui, Color, White
Return
ButtonNext:
Gui, Submit
Gui, Destroy
HoleShape:
Gui, Add, Radio, vHole_Shape Checked x166 y20 w60 h30, Through
Gui, Add, Radio, x166 y60 w60 h30, Pointed
Gui, Add, Radio, x166 y100 w70 h30, Flat-Bottom
Gui, Add, Button, x246 y60 w40 h30, Next
Gui, Show, h144 w300, Hole Shape
Gui, Color, White
Return
ButtonNext:
Gui, Submit
Gui, Destroy
MsgBox, %Hole_Type%, %Hole_Shape%
Return
GuiClose:
ExitApp |
_________________ -buttons, buttons,...
I like to push all the buttons!!! |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Mon Mar 07, 2005 11:40 pm Post subject: |
|
|
| mAdDoG wrote: | HoleType:
...
Gui, Add, Button, x246 y60 w40 h30, Next | Change this to: Gui, Add, Button, gNext x246 y60 w40 h30, Next
| mAdDoG wrote: | HoleShape:
...
Gui, Add, Button, x246 y60 w40 h30, Next | Change this to: Gui, Add, Button, gNext x246 y60 w40 h30, Next
| mAdDoG wrote: | ButtonNext:
Gui, Submit
| Change this to:
Next:
Gui, Submit
Instead of using ButtonNext you're declaring a gosub routine when pressing the next button, should work... _________________
 |
|
| Back to top |
|
 |
mAdDoG
Joined: 29 Dec 2004 Posts: 65
|
Posted: Tue Mar 08, 2005 12:13 am Post subject: |
|
|
Error: "Target label does not exist" _________________ -buttons, buttons,...
I like to push all the buttons!!! |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Tue Mar 08, 2005 1:08 am Post subject: |
|
|
| mAdDoG wrote: | | Error: "Target label does not exist" | Did you remember to change ButtonNext: to Next: ? _________________
 |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Mar 09, 2005 12:36 am Post subject: |
|
|
Says "Next" has been defined more than once.
Would it be better to use "Ok"? (default button name?)
I will eventually have many more gui's to add to this script,
& would like to share the same submit-button name somehow...
The script does work w/different button names when I used:
ButtonNext, &, ButtonOk
| Code: |
HoleType:
Gui, Add, Radio, vHole_Type Checked x166 y20 w60 h30, Drilled
Gui, Add, Radio, x166 y60 w60 h30, Tapped
Gui, Add, Radio, x166 y100 w60 h30, Reamed
Gui, Add, Button, gNext x246 y60 w40 h30, Next
Gui, Show, h144 w300, Hole Type
Gui, Color, White
Return
Next:
Gui, Submit
Gui, Destroy
HoleShape:
Gui, Add, Radio, vHole_Shape Checked x166 y20 w60 h30, Through
Gui, Add, Radio, x166 y60 w60 h30, Pointed
Gui, Add, Radio, x166 y100 w70 h30, Flat-Bottom
Gui, Add, Button, gNext x246 y60 w40 h30, Next
Gui, Show, h144 w300, Hole Shape
Gui, Color, White
Return
Next:
Gui, Submit
Gui, Destroy
MsgBox, %Hole_Type%, %Hole_Shape%
Return
GuiClose:
ExitApp |
Thanks for your help, Titan! |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Wed Mar 09, 2005 12:51 am Post subject: |
|
|
Change the second Next button's lablel to Next_Btn2.
This way you can do:
Next:
Next_Btn2:
ButtonNext:
ButtonOk:
.... CODE ...
Return _________________
 |
|
| 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
|