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 

Multiple GUI's at once....

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



Joined: 22 Oct 2006
Posts: 14

PostPosted: Sun Oct 22, 2006 5:30 am    Post subject: Multiple GUI's at once.... Reply with quote

Hi...I've been using autohotkey for about a year now and I've been wondering how to use multiple gui's in one script in the following ways.

-1). Have when a certain button is pressed, that gui is closed and another is brought up....

-2).(less needed)Have more than one gui up at exact same time performing their own functions.

If someone could please help me out, thanx....
Back to top
View user's profile Send private message
AiKscroll



Joined: 06 Jun 2005
Posts: 179
Location: Northern Virginia

PostPosted: Sun Oct 22, 2006 6:09 am    Post subject: Reply with quote

This example should help you understand.
Code:

Gui, Add, Button, vbtn1 gbtn1, Click to see Window 2
Gui, 2:Add, Button, vbtn2 gbtn2, See us both
Gui, Show, w300 h300, Window 1
Return

btn1:
Gui, Hide
Gui, 2:Show, w300 h300, Window 2
return

btn2:
WinGetPos , x, y, width, height, Window 2
x -= 300
Gui, 1:Show, w300 h300 x%x% y%y%
return

_________________
_AiK
Back to top
View user's profile Send private message AIM Address
restinmyeyes



Joined: 22 Oct 2006
Posts: 14

PostPosted: Sun Oct 22, 2006 6:41 am    Post subject: What about the closing statements? Reply with quote

ok, where
Code:
 ButtonButtonname:
GuiClose:
ExitApp


is, what would i do (i have 2 exit buttons, 1 on each gui)

and also, what if they were the same name...what would i do?

none of my buttons on 2nd gui work....
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Sun Oct 22, 2006 9:16 am    Post subject: Reply with quote

Please post a simple example code, so we can look at it. Thanks.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
restinmyeyes



Joined: 22 Oct 2006
Posts: 14

PostPosted: Sun Oct 22, 2006 4:37 pm    Post subject: NVM Reply with quote

Nevermind, i got it, i searched some other places and found that i have to put a 2, 3, or w/e corresponding gui the button belongs to before it.

And thanks aik....
Back to top
View user's profile Send private message
AiKscroll



Joined: 06 Jun 2005
Posts: 179
Location: Northern Virginia

PostPosted: Sun Oct 22, 2006 4:37 pm    Post subject: Reply with quote

Code:
2GuiClose:
....
Return


would do what you tell it to do when the second GUI is closed.
_________________
_AiK
Back to top
View user's profile Send private message AIM Address
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