SXGuy Posted June 21, 2007 Share Posted June 21, 2007 hi, i was reading the help file about using buttons in a GUI but it doesnt really go into detail regarding how the information from a button click is sent. Could someone explain to me how i can register a button press to open a new GUI window? Im not quite sure where i store the information for the 2nd window either Link to comment Share on other sites More sharing options...
gsglive Posted June 21, 2007 Share Posted June 21, 2007 Here's how: #include <GUIConstants.au3> $Form1 = GUICreate ("Title", 400, 500) $Buttton1 = GUICtrlCreateButton ("Button1", 100, 100, 75, 30) While 1 $msg = GUIGetMsg Switch $msg Case $Button1 $Form2 = GUICreate("Title2", 400, 500) endSwitch - gsglive - gsglive Link to comment Share on other sites More sharing options...
SXGuy Posted June 24, 2007 Author Share Posted June 24, 2007 ah i understand now, thanx for the help Link to comment Share on other sites More sharing options...
star2 Posted June 24, 2007 Share Posted June 24, 2007 (edited) ; 1- include the .au3 file needed for your GUI #include <guiconstants.auÉÝÂÈHÜX]HXZ[ÕRBÌÍÛXZ[HÕRPÜX]H ][ÝÝÝÕRI][ÝËÌäuT6WDföçBÂc¤uT7G&Ä7&VFTÆ&VÂgV÷C²F22FRÖâuTgÕ½Ðì°ÄÀ°ÄÔ°ÈÀÀ¤(ÀÌØí¼ôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí½ÕÐÅÕ½Ðì°ÄÀ°60 , 80 , 30) $x = GUICtrlCreateButton ("exit" , 210 , 60 , Ì BÕRTÙ]Ý]H Õ×ÔÒÕË ÌÍÛXZ[BÈHÜX]HÙXÛÛHÕRBÌÍ·6V6öæBÒuT7&VFRgV÷C´&÷WBgV÷C²Â#äuT6WDföçBÂc¤uT7G± ÉÑ1° ÅÕ½ÐìQ¡¥Ì¥ÌÑ¡¡¥±U$ÅÕ½Ðì°ÈÔ°ÄÔ°ÈÀÀ¤(ÀÌØí½¬ôICtrlCreateButton ("Close" , 50 , 60 , 80 , 30) GUISetState (@SW_QK ÌÍÜÙXÛÛ BÚ[HBIÌÍÛÙÈHÕRQÙ]ÙÈ ÌÍÛXZ[BTÙ[XÝB66Rb33c¶×6rÒb33c¶wVöWfVçEö6Æ÷6R÷"b33c¶×6rÒb33c· W@ 66ÀÌØíµÍôÀÌØí¼($$%U%MÑMÑÑ¡M]}%M 1°ÀÌØíµ¥¸¤($$%U%MÑMÑte (@SW_SHOW , $second) Case $msg = $ok GUISetState (@S×ÑSPH ÌÍÛXZ[BBBQÕRTÙ]Ý]H Õ×ÒQH ÌÍÜÙXÛÛ BQ[Ù[XÝVæ@ check it out Edited June 24, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] Link to comment Share on other sites More sharing options...
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