| View previous topic :: View next topic |
| Author |
Message |
restinmyeyes
Joined: 22 Oct 2006 Posts: 14
|
Posted: Sun Oct 22, 2006 5:30 am Post subject: Multiple GUI's at once.... |
|
|
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 |
|
 |
AiKscroll
Joined: 06 Jun 2005 Posts: 179 Location: Northern Virginia
|
Posted: Sun Oct 22, 2006 6:09 am Post subject: |
|
|
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 |
|
 |
restinmyeyes
Joined: 22 Oct 2006 Posts: 14
|
Posted: Sun Oct 22, 2006 6:41 am Post subject: What about the closing statements? |
|
|
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 |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Sun Oct 22, 2006 9:16 am Post subject: |
|
|
Please post a simple example code, so we can look at it. Thanks. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
restinmyeyes
Joined: 22 Oct 2006 Posts: 14
|
Posted: Sun Oct 22, 2006 4:37 pm Post subject: NVM |
|
|
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 |
|
 |
AiKscroll
Joined: 06 Jun 2005 Posts: 179 Location: Northern Virginia
|
Posted: Sun Oct 22, 2006 4:37 pm Post subject: |
|
|
| Code: | 2GuiClose:
....
Return |
would do what you tell it to do when the second GUI is closed. _________________ _AiK |
|
| Back to top |
|
 |
|