AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

inputbox click clicks button in new gui

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
pantagruel



Joined: 08 Oct 2006
Posts: 67
Location: denmark

PostPosted: Tue May 20, 2008 2:11 pm    Post subject: inputbox click clicks button in new gui Reply with quote

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
View user's profile Send private message
Superfraggle



Joined: 02 Nov 2004
Posts: 846
Location: London, UK

PostPosted: Tue May 20, 2008 2:14 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
pantagruel



Joined: 08 Oct 2006
Posts: 67
Location: denmark

PostPosted: Tue May 20, 2008 2:27 pm    Post subject: damn, figured that one out too Reply with quote

I guess I better starting waiting more than 20 minutes whenever I come up against a problem.
Back to top
View user's profile Send private message
pantagruel



Joined: 08 Oct 2006
Posts: 67
Location: denmark

PostPosted: Tue May 20, 2008 2:38 pm    Post subject: thanks Reply with quote

I had the window opened and didn't notice you'd posted, thanks! I missed that return earlier.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group