 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
pantagruel
Joined: 08 Oct 2006 Posts: 67 Location: denmark
|
Posted: Tue May 20, 2008 2:11 pm Post subject: inputbox click clicks button in new gui |
|
|
Hi,
I'm creating a new gui from the pressing of an input box, so:
InputBox, NewHotKeyName, Opret Nye Genvej, Skriv Genvejens Navn Nedenfor og tryk knappen for at begynde Optagelsen
if(ErrorLevel){
}
else
{
Gui 2:Default
Gui Color, FFFFFF ; Black
Gui +FFFF00
GuiControl, -default, OK
Gui Show, X0 Y0 w300 h100, selectionchanger ;
Gui, Add, Text,,OPTAGELSE I GANGE
Gui, Add, Text,,%NewHotKeyName%
Gui, Add, Button,gButtonStartAgain x20 y60,Start Forfra
Gui, Add, Button,gButtonStopRecording x120 y60,Stop Optagelsen
ButtonStartAgain:
MsgBox, ok then
Return
ButtonStopRecording:
MsgBox, stoppit
Return
}
The problem is that when I press the Inputbox button it goes ahead and draws my GUI, but it seems like it presses the ButtonStartAgain button as well, at any rate as soon as I press the OK in my inputbox it opens up the new GUI and I get the message ok then. |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 846 Location: London, UK
|
Posted: Tue May 20, 2008 2:14 pm Post subject: |
|
|
| Code: | InputBox, NewHotKeyName, Opret Nye Genvej, Skriv Genvejens Navn Nedenfor og tryk knappen for at begynde Optagelsen
if(ErrorLevel){
}
else
{
Gui 2:Default
Gui Color, FFFFFF ; Black
Gui +FFFF00
GuiControl, -default, OK
Gui Show, X0 Y0 w300 h100, selectionchanger ;
Gui, Add, Text,,OPTAGELSE I GANGE
Gui, Add, Text,,%NewHotKeyName%
Gui, Add, Button,gButtonStartAgain x20 y60,Start Forfra
Gui, Add, Button,gButtonStopRecording x120 y60,Stop Optagelsen
}
Return
ButtonStartAgain:
MsgBox, ok then
Return
ButtonStopRecording:
MsgBox, stoppit
Return
|
_________________ Steve F AKA Superfraggle
http://r.yuwie.com/superfraggle |
|
| Back to top |
|
 |
pantagruel
Joined: 08 Oct 2006 Posts: 67 Location: denmark
|
Posted: Tue May 20, 2008 2:27 pm Post subject: damn, figured that one out too |
|
|
| I guess I better starting waiting more than 20 minutes whenever I come up against a problem. |
|
| Back to top |
|
 |
pantagruel
Joined: 08 Oct 2006 Posts: 67 Location: denmark
|
Posted: Tue May 20, 2008 2:38 pm Post subject: thanks |
|
|
| I had the window opened and didn't notice you'd posted, thanks! I missed that return earlier. |
|
| 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
|