Vladi243 Posted May 13, 2008 Posted May 13, 2008 (edited) Hello, I created a GUI by koda. How can I make the GUI be closed and continue the script, after I click on the button? Please tell me how to make it by koda and without it (by script writing). Here is my script. expandcollapse popup#Region ### START Koda GUI section ### Form= $GUI = GUICreate("GUI", 681, 471, 187, 118) $Input1 = GUICtrlCreateInput("", 16, 16, 150, 21) $Input2 = GUICtrlCreateInput("", 16, 48, 150, 21) $Input3 = GUICtrlCreateInput("", 16, 80, 150, 21) $Input4 = GUICtrlCreateInput("", 16, 112, 150, 21) $Input5 = GUICtrlCreateInput("", 16, 144, 150, 21) $Input6 = GUICtrlCreateInput("", 16, 176, 150, 21) $Input7 = GUICtrlCreateInput("", 16, 208, 150, 21) $Input8 = GUICtrlCreateInput("", 16, 240, 150, 21) $Input9 = GUICtrlCreateInput("", 16, 272, 150, 21) $Input10 = GUICtrlCreateInput("", 16, 304, 150, 21) $Input11 = GUICtrlCreateInput("", 182, 16, 150, 21) $Input12 = GUICtrlCreateInput("", 182, 48, 150, 21) $Input13 = GUICtrlCreateInput("", 182, 80, 150, 21) $Input14 = GUICtrlCreateInput("", 182, 112, 150, 21) $Input15 = GUICtrlCreateInput("", 182, 144, 150, 21) $Input16 = GUICtrlCreateInput("", 182, 176, 150, 21) $Input17 = GUICtrlCreateInput("", 182, 208, 150, 21) $Input18 = GUICtrlCreateInput("", 182, 240, 150, 21) $Input19 = GUICtrlCreateInput("", 182, 272, 150, 21) $Input20 = GUICtrlCreateInput("", 182, 304, 150, 21) $Input21 = GUICtrlCreateInput("", 348, 16, 150, 21) $Input22 = GUICtrlCreateInput("", 348, 48, 150, 21) $Input23 = GUICtrlCreateInput("", 348, 80, 150, 21) $Input24 = GUICtrlCreateInput("", 348, 112, 150, 21) $Input25 = GUICtrlCreateInput("", 348, 144, 150, 21) $Input26 = GUICtrlCreateInput("", 348, 176, 150, 21) $Input27 = GUICtrlCreateInput("", 348, 208, 150, 21) $Input28 = GUICtrlCreateInput("", 348, 240, 150, 21) $Input29 = GUICtrlCreateInput("", 348, 272, 150, 21) $Input30 = GUICtrlCreateInput("", 348, 304, 150, 21) $Input31 = GUICtrlCreateInput("", 514, 16, 150, 21) $Input32 = GUICtrlCreateInput("", 514, 48, 150, 21) $Input33 = GUICtrlCreateInput("", 514, 80, 150, 21) $Input34 = GUICtrlCreateInput("", 514, 112, 150, 21) $Input35 = GUICtrlCreateInput("", 514, 144, 150, 21) $Input36 = GUICtrlCreateInput("", 514, 176, 150, 21) $Input37 = GUICtrlCreateInput("", 514, 208, 150, 21) $Input38 = GUICtrlCreateInput("", 514, 240, 150, 21) $Input39 = GUICtrlCreateInput("", 514, 272, 150, 21) $Input40 = GUICtrlCreateInput("", 514, 304, 150, 21) $Input41 = GUICtrlCreateInput("", 16, 336, 150, 21) $Input43 = GUICtrlCreateInput("", 182, 336, 150, 21) $Input44 = GUICtrlCreateInput("", 348, 336, 150, 21) $Input45 = GUICtrlCreateInput("", 514, 336, 150, 21) $Input42 = GUICtrlCreateInput("", 16, 368, 150, 21) $Input46 = GUICtrlCreateInput("", 182, 368, 150, 21) $Input47 = GUICtrlCreateInput("", 348, 368, 150, 21) $Input48 = GUICtrlCreateInput("", 514, 368, 150, 21) $Button1 = GUICtrlCreateButton("Start", 290, 408, 100, 40, 0) GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ;Here is the rest script Thanks, Vladi. Edited May 13, 2008 by Vladi243
goldenix Posted May 13, 2008 Posted May 13, 2008 (edited) see sample there:http://www.autoitscript.com/forum/index.ph...&pid=519552If you have 1 gui then just use : GUISetState(@SW_hide) Edited May 13, 2008 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Vladi243 Posted May 13, 2008 Author Posted May 13, 2008 If you have 1 gui then just use : GUISetState(@SW_hide)Thanks for the response.I didn't understand how it can help me. It hides the window.
Vladi243 Posted May 13, 2008 Author Posted May 13, 2008 I still can't do it. I'll explain again what I want to do. When I press the button in the GUI that I created, there is no reaction. I want that after the button click, the window would close and continue the script that after the GUI.
RyGoTypE Posted May 13, 2008 Posted May 13, 2008 So you just want to minimize the GUI to System Tray and continue running the script after the button is clicked? http://www.shizzkabiz.com/
Vladi243 Posted May 13, 2008 Author Posted May 13, 2008 No, I want to close the window after the button click.
JD777 Posted May 13, 2008 Posted May 13, 2008 expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $swt = 0 $GUI = GUICreate("GUI", 681, 471, 187, 118) $Input1 = GUICtrlCreateInput("", 16, 16, 150, 21) $Input2 = GUICtrlCreateInput("", 16, 48, 150, 21) $Input3 = GUICtrlCreateInput("", 16, 80, 150, 21) $Input4 = GUICtrlCreateInput("", 16, 112, 150, 21) $Input5 = GUICtrlCreateInput("", 16, 144, 150, 21) $Input6 = GUICtrlCreateInput("", 16, 176, 150, 21) $Input7 = GUICtrlCreateInput("", 16, 208, 150, 21) $Input8 = GUICtrlCreateInput("", 16, 240, 150, 21) $Input9 = GUICtrlCreateInput("", 16, 272, 150, 21) $Input10 = GUICtrlCreateInput("", 16, 304, 150, 21) $Input11 = GUICtrlCreateInput("", 182, 16, 150, 21) $Input12 = GUICtrlCreateInput("", 182, 48, 150, 21) $Input13 = GUICtrlCreateInput("", 182, 80, 150, 21) $Input14 = GUICtrlCreateInput("", 182, 112, 150, 21) $Input15 = GUICtrlCreateInput("", 182, 144, 150, 21) $Input16 = GUICtrlCreateInput("", 182, 176, 150, 21) $Input17 = GUICtrlCreateInput("", 182, 208, 150, 21) $Input18 = GUICtrlCreateInput("", 182, 240, 150, 21) $Input19 = GUICtrlCreateInput("", 182, 272, 150, 21) $Input20 = GUICtrlCreateInput("", 182, 304, 150, 21) $Input21 = GUICtrlCreateInput("", 348, 16, 150, 21) $Input22 = GUICtrlCreateInput("", 348, 48, 150, 21) $Input23 = GUICtrlCreateInput("", 348, 80, 150, 21) $Input24 = GUICtrlCreateInput("", 348, 112, 150, 21) $Input25 = GUICtrlCreateInput("", 348, 144, 150, 21) $Input26 = GUICtrlCreateInput("", 348, 176, 150, 21) $Input27 = GUICtrlCreateInput("", 348, 208, 150, 21) $Input28 = GUICtrlCreateInput("", 348, 240, 150, 21) $Input29 = GUICtrlCreateInput("", 348, 272, 150, 21) $Input30 = GUICtrlCreateInput("", 348, 304, 150, 21) $Input31 = GUICtrlCreateInput("", 514, 16, 150, 21) $Input32 = GUICtrlCreateInput("", 514, 48, 150, 21) $Input33 = GUICtrlCreateInput("", 514, 80, 150, 21) $Input34 = GUICtrlCreateInput("", 514, 112, 150, 21) $Input35 = GUICtrlCreateInput("", 514, 144, 150, 21) $Input36 = GUICtrlCreateInput("", 514, 176, 150, 21) $Input37 = GUICtrlCreateInput("", 514, 208, 150, 21) $Input38 = GUICtrlCreateInput("", 514, 240, 150, 21) $Input39 = GUICtrlCreateInput("", 514, 272, 150, 21) $Input40 = GUICtrlCreateInput("", 514, 304, 150, 21) $Input41 = GUICtrlCreateInput("", 16, 336, 150, 21) $Input43 = GUICtrlCreateInput("", 182, 336, 150, 21) $Input44 = GUICtrlCreateInput("", 348, 336, 150, 21) $Input45 = GUICtrlCreateInput("", 514, 336, 150, 21) $Input42 = GUICtrlCreateInput("", 16, 368, 150, 21) $Input46 = GUICtrlCreateInput("", 182, 368, 150, 21) $Input47 = GUICtrlCreateInput("", 348, 368, 150, 21) $Input48 = GUICtrlCreateInput("", 514, 368, 150, 21) $Button1 = GUICtrlCreateButton("Start", 290, 408, 100, 40, 0) GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 And $swt = 0 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE $swt = 2 EndSwitch WEnd GUIDelete() ;Here is the rest script
JD777 Posted May 13, 2008 Posted May 13, 2008 (edited) I get an error when I tries it. Replace the bottom of you're script with this $switch = 0 While 1 And $switch = 0 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE $switch = 2 EndSwitch WEnd GUIDelete() ;Here is the rest script Edited May 13, 2008 by JD777
Vladi243 Posted May 13, 2008 Author Posted May 13, 2008 It doesn't help. When I press the button, there is no reaction.
goldenix Posted May 13, 2008 Posted May 13, 2008 k let me explain, in the example i posted you can see how to manage GUI with on event mode. This is a lot more simple & less confusing that while/switch method, especially if your code will be bigger, like 100+ lines. Especially if you are beginner then on event mode is good idea to start with.in on event mode this what happens:You click a button & a Button1 function is called like you see GUICtrlSetOnEvent($Button1, "Button1")in your code ur prog must loop through all code to find matching Case $GUI_EVENT_CLOSE My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
JD777 Posted May 13, 2008 Posted May 13, 2008 It doesn't help. When I press the button, there is no reaction. PASTE THIS INTO EMPTY WINDOW EXACTLY expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $GUI = GUICreate("GUI", 681, 471, 187, 118) $Input1 = GUICtrlCreateInput("", 16, 16, 150, 21) $Input2 = GUICtrlCreateInput("", 16, 48, 150, 21) $Input3 = GUICtrlCreateInput("", 16, 80, 150, 21) $Input4 = GUICtrlCreateInput("", 16, 112, 150, 21) $Input5 = GUICtrlCreateInput("", 16, 144, 150, 21) $Input6 = GUICtrlCreateInput("", 16, 176, 150, 21) $Input7 = GUICtrlCreateInput("", 16, 208, 150, 21) $Input8 = GUICtrlCreateInput("", 16, 240, 150, 21) $Input9 = GUICtrlCreateInput("", 16, 272, 150, 21) $Input10 = GUICtrlCreateInput("", 16, 304, 150, 21) $Input11 = GUICtrlCreateInput("", 182, 16, 150, 21) $Input12 = GUICtrlCreateInput("", 182, 48, 150, 21) $Input13 = GUICtrlCreateInput("", 182, 80, 150, 21) $Input14 = GUICtrlCreateInput("", 182, 112, 150, 21) $Input15 = GUICtrlCreateInput("", 182, 144, 150, 21) $Input16 = GUICtrlCreateInput("", 182, 176, 150, 21) $Input17 = GUICtrlCreateInput("", 182, 208, 150, 21) $Input18 = GUICtrlCreateInput("", 182, 240, 150, 21) $Input19 = GUICtrlCreateInput("", 182, 272, 150, 21) $Input20 = GUICtrlCreateInput("", 182, 304, 150, 21) $Input21 = GUICtrlCreateInput("", 348, 16, 150, 21) $Input22 = GUICtrlCreateInput("", 348, 48, 150, 21) $Input23 = GUICtrlCreateInput("", 348, 80, 150, 21) $Input24 = GUICtrlCreateInput("", 348, 112, 150, 21) $Input25 = GUICtrlCreateInput("", 348, 144, 150, 21) $Input26 = GUICtrlCreateInput("", 348, 176, 150, 21) $Input27 = GUICtrlCreateInput("", 348, 208, 150, 21) $Input28 = GUICtrlCreateInput("", 348, 240, 150, 21) $Input29 = GUICtrlCreateInput("", 348, 272, 150, 21) $Input30 = GUICtrlCreateInput("", 348, 304, 150, 21) $Input31 = GUICtrlCreateInput("", 514, 16, 150, 21) $Input32 = GUICtrlCreateInput("", 514, 48, 150, 21) $Input33 = GUICtrlCreateInput("", 514, 80, 150, 21) $Input34 = GUICtrlCreateInput("", 514, 112, 150, 21) $Input35 = GUICtrlCreateInput("", 514, 144, 150, 21) $Input36 = GUICtrlCreateInput("", 514, 176, 150, 21) $Input37 = GUICtrlCreateInput("", 514, 208, 150, 21) $Input38 = GUICtrlCreateInput("", 514, 240, 150, 21) $Input39 = GUICtrlCreateInput("", 514, 272, 150, 21) $Input40 = GUICtrlCreateInput("", 514, 304, 150, 21) $Input41 = GUICtrlCreateInput("", 16, 336, 150, 21) $Input43 = GUICtrlCreateInput("", 182, 336, 150, 21) $Input44 = GUICtrlCreateInput("", 348, 336, 150, 21) $Input45 = GUICtrlCreateInput("", 514, 336, 150, 21) $Input42 = GUICtrlCreateInput("", 16, 368, 150, 21) $Input46 = GUICtrlCreateInput("", 182, 368, 150, 21) $Input47 = GUICtrlCreateInput("", 348, 368, 150, 21) $Input48 = GUICtrlCreateInput("", 514, 368, 150, 21) $Button1 = GUICtrlCreateButton("Start", 290, 408, 100, 40, 0) GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $swt = 0 While 1 And $swt = 0 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE $swt = 2 ;Exit EndSwitch WEnd ;Here is the rest script GUIDelete() msgbox(4096,"","GUI is gone! Rest of Script will now go on without GUI!")
Vladi243 Posted May 13, 2008 Author Posted May 13, 2008 It's works only when I click on X and exit the window, but I want that the script will continue when I click on "Start" button (it's not working).
goldenix Posted May 13, 2008 Posted May 13, 2008 (edited) It's works only when I click on X and exit the window, but I want that the script will continue when I click on "Start" button (it's not working). Is this not working for you? expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) ; Change to OnEvent mode #Region ### START Koda GUI section ### Form= $GUI = GUICreate("GUI", 681, 471, 187, 118) $Input1 = GUICtrlCreateInput("", 16, 16, 150, 21) $Input2 = GUICtrlCreateInput("", 16, 48, 150, 21) $Input3 = GUICtrlCreateInput("", 16, 80, 150, 21) $Input4 = GUICtrlCreateInput("", 16, 112, 150, 21) $Input5 = GUICtrlCreateInput("", 16, 144, 150, 21) $Input6 = GUICtrlCreateInput("", 16, 176, 150, 21) $Input7 = GUICtrlCreateInput("", 16, 208, 150, 21) $Input8 = GUICtrlCreateInput("", 16, 240, 150, 21) $Input9 = GUICtrlCreateInput("", 16, 272, 150, 21) $Input10 = GUICtrlCreateInput("", 16, 304, 150, 21) $Input11 = GUICtrlCreateInput("", 182, 16, 150, 21) $Input12 = GUICtrlCreateInput("", 182, 48, 150, 21) $Input13 = GUICtrlCreateInput("", 182, 80, 150, 21) $Input14 = GUICtrlCreateInput("", 182, 112, 150, 21) $Input15 = GUICtrlCreateInput("", 182, 144, 150, 21) $Input16 = GUICtrlCreateInput("", 182, 176, 150, 21) $Input17 = GUICtrlCreateInput("", 182, 208, 150, 21) $Input18 = GUICtrlCreateInput("", 182, 240, 150, 21) $Input19 = GUICtrlCreateInput("", 182, 272, 150, 21) $Input20 = GUICtrlCreateInput("", 182, 304, 150, 21) $Input21 = GUICtrlCreateInput("", 348, 16, 150, 21) $Input22 = GUICtrlCreateInput("", 348, 48, 150, 21) $Input23 = GUICtrlCreateInput("", 348, 80, 150, 21) $Input24 = GUICtrlCreateInput("", 348, 112, 150, 21) $Input25 = GUICtrlCreateInput("", 348, 144, 150, 21) $Input26 = GUICtrlCreateInput("", 348, 176, 150, 21) $Input27 = GUICtrlCreateInput("", 348, 208, 150, 21) $Input28 = GUICtrlCreateInput("", 348, 240, 150, 21) $Input29 = GUICtrlCreateInput("", 348, 272, 150, 21) $Input30 = GUICtrlCreateInput("", 348, 304, 150, 21) $Input31 = GUICtrlCreateInput("", 514, 16, 150, 21) $Input32 = GUICtrlCreateInput("", 514, 48, 150, 21) $Input33 = GUICtrlCreateInput("", 514, 80, 150, 21) $Input34 = GUICtrlCreateInput("", 514, 112, 150, 21) $Input35 = GUICtrlCreateInput("", 514, 144, 150, 21) $Input36 = GUICtrlCreateInput("", 514, 176, 150, 21) $Input37 = GUICtrlCreateInput("", 514, 208, 150, 21) $Input38 = GUICtrlCreateInput("", 514, 240, 150, 21) $Input39 = GUICtrlCreateInput("", 514, 272, 150, 21) $Input40 = GUICtrlCreateInput("", 514, 304, 150, 21) $Input41 = GUICtrlCreateInput("", 16, 336, 150, 21) $Input43 = GUICtrlCreateInput("", 182, 336, 150, 21) $Input44 = GUICtrlCreateInput("", 348, 336, 150, 21) $Input45 = GUICtrlCreateInput("", 514, 336, 150, 21) $Input42 = GUICtrlCreateInput("", 16, 368, 150, 21) $Input46 = GUICtrlCreateInput("", 182, 368, 150, 21) $Input47 = GUICtrlCreateInput("", 348, 368, 150, 21) $Input48 = GUICtrlCreateInput("", 514, 368, 150, 21) $Button1 = GUICtrlCreateButton("Start", 290, 408, 100, 40, 0) GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ; events GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUICtrlSetOnEvent($Button1, "Button1") Func Button1() GUIDelete() #notrayicon for $a = 1 to 100 ; count till 100 tooltip($a,0,0) sleep(500) Next EndFunc Func CLOSEClicked() Exit EndFunc While 1 Sleep(1000) ; Idle around WEnd Edited May 13, 2008 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
RyGoTypE Posted May 13, 2008 Posted May 13, 2008 Yeah you can try his if you wish but please, try mine. See if this is what you are looking for... I am kind of an Autoit NOOBIE but I would just like to know if my tweaks helped you or not. expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $swt = 0 $GUI = GUICreate("GUI", 681, 471, 187, 118) $Input1 = GUICtrlCreateInput("", 16, 16, 150, 21) $Input2 = GUICtrlCreateInput("", 16, 48, 150, 21) $Input3 = GUICtrlCreateInput("", 16, 80, 150, 21) $Input4 = GUICtrlCreateInput("", 16, 112, 150, 21) $Input5 = GUICtrlCreateInput("", 16, 144, 150, 21) $Input6 = GUICtrlCreateInput("", 16, 176, 150, 21) $Input7 = GUICtrlCreateInput("", 16, 208, 150, 21) $Input8 = GUICtrlCreateInput("", 16, 240, 150, 21) $Input9 = GUICtrlCreateInput("", 16, 272, 150, 21) $Input10 = GUICtrlCreateInput("", 16, 304, 150, 21) $Input11 = GUICtrlCreateInput("", 182, 16, 150, 21) $Input12 = GUICtrlCreateInput("", 182, 48, 150, 21) $Input13 = GUICtrlCreateInput("", 182, 80, 150, 21) $Input14 = GUICtrlCreateInput("", 182, 112, 150, 21) $Input15 = GUICtrlCreateInput("", 182, 144, 150, 21) $Input16 = GUICtrlCreateInput("", 182, 176, 150, 21) $Input17 = GUICtrlCreateInput("", 182, 208, 150, 21) $Input18 = GUICtrlCreateInput("", 182, 240, 150, 21) $Input19 = GUICtrlCreateInput("", 182, 272, 150, 21) $Input20 = GUICtrlCreateInput("", 182, 304, 150, 21) $Input21 = GUICtrlCreateInput("", 348, 16, 150, 21) $Input22 = GUICtrlCreateInput("", 348, 48, 150, 21) $Input23 = GUICtrlCreateInput("", 348, 80, 150, 21) $Input24 = GUICtrlCreateInput("", 348, 112, 150, 21) $Input25 = GUICtrlCreateInput("", 348, 144, 150, 21) $Input26 = GUICtrlCreateInput("", 348, 176, 150, 21) $Input27 = GUICtrlCreateInput("", 348, 208, 150, 21) $Input28 = GUICtrlCreateInput("", 348, 240, 150, 21) $Input29 = GUICtrlCreateInput("", 348, 272, 150, 21) $Input30 = GUICtrlCreateInput("", 348, 304, 150, 21) $Input31 = GUICtrlCreateInput("", 514, 16, 150, 21) $Input32 = GUICtrlCreateInput("", 514, 48, 150, 21) $Input33 = GUICtrlCreateInput("", 514, 80, 150, 21) $Input34 = GUICtrlCreateInput("", 514, 112, 150, 21) $Input35 = GUICtrlCreateInput("", 514, 144, 150, 21) $Input36 = GUICtrlCreateInput("", 514, 176, 150, 21) $Input37 = GUICtrlCreateInput("", 514, 208, 150, 21) $Input38 = GUICtrlCreateInput("", 514, 240, 150, 21) $Input39 = GUICtrlCreateInput("", 514, 272, 150, 21) $Input40 = GUICtrlCreateInput("", 514, 304, 150, 21) $Input41 = GUICtrlCreateInput("", 16, 336, 150, 21) $Input43 = GUICtrlCreateInput("", 182, 336, 150, 21) $Input44 = GUICtrlCreateInput("", 348, 336, 150, 21) $Input45 = GUICtrlCreateInput("", 514, 336, 150, 21) $Input42 = GUICtrlCreateInput("", 16, 368, 150, 21) $Input46 = GUICtrlCreateInput("", 182, 368, 150, 21) $Input47 = GUICtrlCreateInput("", 348, 368, 150, 21) $Input48 = GUICtrlCreateInput("", 514, 368, 150, 21) $Button1 = GUICtrlCreateButton("Start", 290, 408, 100, 40, 0) Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUICtrlSetOnEvent($Button1, "CLOSEClicked") Func CLOSEClicked() GUIDelete() EndFunc GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 And $swt = 0 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE $swt = 2 EndSwitch WEnd ;Here is the rest script http://www.shizzkabiz.com/
Vladi243 Posted May 13, 2008 Author Posted May 13, 2008 Thank guys, I'll try it in the morning. I have to sleep, it's the middle of night here.
Vladi243 Posted May 14, 2008 Author Posted May 14, 2008 goldenix@ I tried your script, and it was realy closed after I clicked on the button, but the whole script closed. RyGoTypE@, I tried also your script, and it was realy closed after I clicked the button. In this case the script wasn't closed, but there are no reaction (after I click on the button, my browser supposed to be opened, due to the script I wrote after the GUI). Do you have another suggestions?
goldenix Posted May 14, 2008 Posted May 14, 2008 goldenix@I tried your script, and it was realy closed after I clicked on the button, but the whole script closed. Do you have another suggestions?Bites me, its working fine for me. If you are complaining about the fact, that the tray icon vanished, then just remove #notrayicon line. My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Vladi243 Posted May 14, 2008 Author Posted May 14, 2008 OK, it's working now.I wrote it in this formexpandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) ; Change to OnEvent mode #Region ### START Koda GUI section ### Form= $GUI = GUICreate("GUI", 681, 471, 187, 118) $Input1 = GUICtrlCreateInput("", 16, 16, 150, 21) $Input2 = GUICtrlCreateInput("", 16, 48, 150, 21) $Input3 = GUICtrlCreateInput("", 16, 80, 150, 21) $Input4 = GUICtrlCreateInput("", 16, 112, 150, 21) $Input5 = GUICtrlCreateInput("", 16, 144, 150, 21) $Input6 = GUICtrlCreateInput("", 16, 176, 150, 21) $Input7 = GUICtrlCreateInput("", 16, 208, 150, 21) $Input8 = GUICtrlCreateInput("", 16, 240, 150, 21) $Input9 = GUICtrlCreateInput("", 16, 272, 150, 21) $Input10 = GUICtrlCreateInput("", 16, 304, 150, 21) $Input11 = GUICtrlCreateInput("", 182, 16, 150, 21) $Input12 = GUICtrlCreateInput("", 182, 48, 150, 21) $Input13 = GUICtrlCreateInput("", 182, 80, 150, 21) $Input14 = GUICtrlCreateInput("", 182, 112, 150, 21) $Input15 = GUICtrlCreateInput("", 182, 144, 150, 21) $Input16 = GUICtrlCreateInput("", 182, 176, 150, 21) $Input17 = GUICtrlCreateInput("", 182, 208, 150, 21) $Input18 = GUICtrlCreateInput("", 182, 240, 150, 21) $Input19 = GUICtrlCreateInput("", 182, 272, 150, 21) $Input20 = GUICtrlCreateInput("", 182, 304, 150, 21) $Input21 = GUICtrlCreateInput("", 348, 16, 150, 21) $Input22 = GUICtrlCreateInput("", 348, 48, 150, 21) $Input23 = GUICtrlCreateInput("", 348, 80, 150, 21) $Input24 = GUICtrlCreateInput("", 348, 112, 150, 21) $Input25 = GUICtrlCreateInput("", 348, 144, 150, 21) $Input26 = GUICtrlCreateInput("", 348, 176, 150, 21) $Input27 = GUICtrlCreateInput("", 348, 208, 150, 21) $Input28 = GUICtrlCreateInput("", 348, 240, 150, 21) $Input29 = GUICtrlCreateInput("", 348, 272, 150, 21) $Input30 = GUICtrlCreateInput("", 348, 304, 150, 21) $Input31 = GUICtrlCreateInput("", 514, 16, 150, 21) $Input32 = GUICtrlCreateInput("", 514, 48, 150, 21) $Input33 = GUICtrlCreateInput("", 514, 80, 150, 21) $Input34 = GUICtrlCreateInput("", 514, 112, 150, 21) $Input35 = GUICtrlCreateInput("", 514, 144, 150, 21) $Input36 = GUICtrlCreateInput("", 514, 176, 150, 21) $Input37 = GUICtrlCreateInput("", 514, 208, 150, 21) $Input38 = GUICtrlCreateInput("", 514, 240, 150, 21) $Input39 = GUICtrlCreateInput("", 514, 272, 150, 21) $Input40 = GUICtrlCreateInput("", 514, 304, 150, 21) $Input41 = GUICtrlCreateInput("", 16, 336, 150, 21) $Input43 = GUICtrlCreateInput("", 182, 336, 150, 21) $Input44 = GUICtrlCreateInput("", 348, 336, 150, 21) $Input45 = GUICtrlCreateInput("", 514, 336, 150, 21) $Input42 = GUICtrlCreateInput("", 16, 368, 150, 21) $Input46 = GUICtrlCreateInput("", 182, 368, 150, 21) $Input47 = GUICtrlCreateInput("", 348, 368, 150, 21) $Input48 = GUICtrlCreateInput("", 514, 368, 150, 21) $Button1 = GUICtrlCreateButton("Start", 290, 408, 100, 40, 0) GUICtrlSetFont(-1, 16, 800, 0, "Arial") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;Events GUICtrlSetOnEvent($Button1, "clicked") GUISetOnEvent($GUI_EVENT_CLOSE, "close") GUISetState() Func close() Exit EndFunc Func clicked() GUIDelete() $i=0 Do ;Here is my rest script Until $i=48 EndFunc While 1 Sleep (1000);Idle around WEndI put the rest of the script in the Func clicked(). Now the script runs after I press on the button.Thanks to all of you.
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