ausssieautomate Posted November 13, 2008 Posted November 13, 2008 Hi Guys/Gals,Just starting out in AutoIt so I am still trying to get my bearings. How do I get the program to close just the $form2 box when I click the red 'X' rather than the whole program. #include <GUIConstants.au3>#include <GuiButton.au3>$Form1 = GUICreate("Testing", 930, 524, 44, 81)$Button1 = GUICtrlCreateButton("Next Form", 608, 440, 161, 41, 0)GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")GUISetState()While 1$Msg = GUIGetMsg()Switch $Msg if _ispressed ("0D") Then $msg = $button1 endIf Case $Button1 $Form2 = GUICreate("Troubleshooting Instructions", 800, 500) $iMemo = GUICtrlCreateEdit("", 4, 35, 592, 428) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") GUISetState() Case $GUI_EVENT_CLOSE Exit EndSwitchWEndCheers Ps Also I do close a forum topic I've searched around, but I can't find the button anywhere. Maybe I am suffering from ID 10 T syndrome. LOL Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)
dbzfanatic Posted November 13, 2008 Posted November 13, 2008 Hi Guys/Gals, Just starting out in AutoIt so I am still trying to get my bearings. How do I get the program to close just the $form2 box when I click the red 'X' rather than the whole program. #include <GUIConstants.au3> #include <GuiButton.au3> $Form1 = GUICreate("Testing", 930, 524, 44, 81) $Button1 = GUICtrlCreateButton("Next Form", 608, 440, 161, 41, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg if _ispressed ("0D") Then $msg = $button1 endIf Case $Button1 $Form2 = GUICreate("Troubleshooting Instructions", 800, 500) $iMemo = GUICtrlCreateEdit("", 4, 35, 592, 428) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") GUISetState() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Cheers Ps Also I do close a forum topic I've searched around, but I can't find the button anywhere. Maybe I am suffering from ID 10 T syndrome. LOLLol nice one. Just change your Case $GUI_EVENT_CLOSE exit to Case $GUI_EVENT_CLOSE GuiSetState(@SW_HIDE,$form2) Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
ausssieautomate Posted November 14, 2008 Author Posted November 14, 2008 Cheers mate it's working now. Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)
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