AutoHotkey Community

It is currently May 27th, 2012, 8:47 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Open second gui
PostPosted: July 9th, 2006, 3:03 pm 
Offline

Joined: September 20th, 2005, 9:04 pm
Posts: 158
Hi

I just can't seem to open the second gui and hide the 1st.
Could someone tell what is wrong in the code.

Thanks


Code:
Gui, +AlwaysOnTop -SysMenu
Gui, Add, Button, gOptions ,Options
Gui, Show, , Win1
return

Gui, 2:+AlwaysOnTop -SysMenu
Gui, 2:Add, Button, gBack , Back
Gui, 2:Show, Win2
return

Options:
Gui, 2:Show
Gui, Hide
Return

Back:
Gui, Show
Gui, 2:Hide
Return

GuiEscape:
GuiClose:
ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 9th, 2006, 3:27 pm 
Offline

Joined: October 20th, 2005, 11:56 am
Posts: 23
Hi Bradley S

Looks like GUI 1 hits the 1st return and stops.
so Gui 2 is never shown.

take out the first return, then both GUI's are shown but are now 1 on top of the other.

dB

Disclaimer. - This is a newbies response, so accuracy is not always guaranteed

_________________
Everyone makes mistakes, that's why they put erasers on pencils. Milhouse, The Simpsons


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 9th, 2006, 3:46 pm 
Offline

Joined: October 20th, 2005, 11:56 am
Posts: 23
My effort of your code
Note GUI, 1: is not required but helps me understand
also -Sysmenu disables the guiclose and escape key,

Code:
Gui, 1:+AlwaysOnTop -SysMenu
Gui, 1:Add, Button, gOptions ,Options
;return
Gui, 2:+AlwaysOnTop -SysMenu
Gui, 2:Add, Button, gBack , Back
;Gui, 2:Show, Win2
Gui, 1:Show, , Win1
return

Options:
Gui, 1:Hide
Gui, 2:Show,,Win2
Return

Back:
Gui, 2:Hide
Gui, 1:Show
Return

GuiEscape:
GuiClose:
ExitApp



Hope this helps
enjoy
dB

_________________
Everyone makes mistakes, that's why they put erasers on pencils. Milhouse, The Simpsons


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 9th, 2006, 4:40 pm 
Offline

Joined: September 20th, 2005, 9:04 pm
Posts: 158
Hi

No sorry that did't help, as I don't want both windows open, and with no return they both show on top of each other.

However, I figured it out in the end.

Code:
Gui, +AlwaysOnTop -SysMenu
Gui, Add, Button, gOptions ,Options
Gui, Show, , Win1
Return

Options:
Gui, Hide
Gui, 2:+AlwaysOnTop -SysMenu
Gui, 2:Add, Button, gBack , Back
Gui, 2:Show, ,Win2
Return

Back:
Gui, 1:Show
Gui, 2:Hide
Return


Thanks anyway for trying


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 9th, 2006, 9:06 pm 
Offline

Joined: October 20th, 2005, 11:56 am
Posts: 23
Ummmm,
My second post only shows 1 gui at a time.
I commented out the return and Gui 2:show ,

Both look to work now though, so a result in the end.

Thanks
dB

_________________
Everyone makes mistakes, that's why they put erasers on pencils. Milhouse, The Simpsons


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], XstatyK and 61 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