evilertoaster Posted February 19, 2006 Posted February 19, 2006 (edited) Hey, I posted this in the GUI section but maybe it is more of a problem for this forum- #include <GUIConstants.au3> opt ("Guioneventmode",1) ;make GUI1 $GUI1=GUICreate("GUI1") $button1=GUICtrlCreateButton("button1", 50, 50) GUICtrlSetOnEvent($button1, "action1") ;Make GUI2 $GUI2 = GUICreate("GUI2") $button2=GUICtrlCreateButton("button2", 50, 50) GUICtrlSetOnEvent($button2,"action2") ;Show GUI1 GUIsetstate(@SW_SHOW,$GUI1) ;Wait around While 1 sleep (1000) WEnd ;Button1 is pressed... func action1 () GUISetState(@SW_SHOW,$GUI2) ;show GUI2 then wait around while 1 sleep (1000) WEnd endfunc ;when button2 is pressed this function IS NOT CALLED func action2 () MsgBox(0,"OK","You pressed button2") endfunc Maybe that will help simplify things... Basically it's calling a function from inside a funcion Edited February 19, 2006 by evilertoaster
Valuater Posted February 19, 2006 Posted February 19, 2006 change this func action1 () GUISetState(@SW_SHOW,$GUI2) ;show GUI2 then wait around while 1 sleep (1000) WEnd endfunc to this func action1 () GUISetState(@SW_SHOW,$GUI2) endfunc 8)
evilertoaster Posted February 19, 2006 Author Posted February 19, 2006 This works but the problem is that in my actual code i'm doing somthing in that while loop that you removed. I guess i just need to know why this is doing it... can GUI OnEvents not be called from functions?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now