AutoHotkey Community

It is currently May 27th, 2012, 9:39 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: October 22nd, 2006, 5:30 am 
Offline

Joined: October 22nd, 2006, 4:58 am
Posts: 14
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....


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2006, 6:09 am 
Offline

Joined: June 6th, 2005, 11:35 pm
Posts: 179
Location: Northern Virginia
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


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 22nd, 2006, 6:41 am 
Offline

Joined: October 22nd, 2006, 4:58 am
Posts: 14
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....


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2006, 9:16 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Please post a simple example code, so we can look at it. Thanks.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: NVM
PostPosted: October 22nd, 2006, 4:37 pm 
Offline

Joined: October 22nd, 2006, 4:58 am
Posts: 14
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....


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2006, 4:37 pm 
Offline

Joined: June 6th, 2005, 11:35 pm
Posts: 179
Location: Northern Virginia
Code:
2GuiClose:
....
Return


would do what you tell it to do when the second GUI is closed.

_________________
_AiK


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Maestr0, migz99, tomoe_uehara and 63 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group