ThisIsBenSilver Posted February 9, 2017 Posted February 9, 2017 I used Koda to generate this form (this code is literally just what Koda generated, with no modifications) Even without modifying this code at all, the window son't close if you press the X button. It will minimize, but it won't close. Even if I press Alt-F4 Any ideas? expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form=C:\Users\silverb-a.WILLIS\Box Sync\AutoITScipts\GuiDocExporter\Interface.kxf $CaseReprinter = GUICreate("Ana-IT Case Reprinter", 501, 401, 249, 200) GUISetBkColor(0x99B4D1) GUISetOnEvent($GUI_EVENT_CLOSE, "CaseReprinterClose") GUISetOnEvent($GUI_EVENT_MINIMIZE, "CaseReprinterMinimize") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "CaseReprinterMaximize") GUISetOnEvent($GUI_EVENT_RESTORE, "CaseReprinterRestore") $FilePicker = GUICtrlCreateGroup("", 8, 0, 393, 73) GUICtrlSetBkColor($FilePicker, 0x000080) $btnPickFile = GUICtrlCreateButton("Pick File", 16, 16, 65, 49) GUICtrlSetFont($btnPickFile, 9, 800, 0, "MS Sans Serif") GUICtrlSetBkColor($btnPickFile, 0xA6CAF0) GUICtrlSetOnEvent($btnPickFile, "btnPickFileClick") $txtFilePath = GUICtrlCreateInput("...", 88, 16, 305, 21) GUICtrlSetFont($txtFilePath, 8, 800, 0, "MS Sans Serif") GUICtrlSetOnEvent($txtFilePath, "txtFilePathChange") $optCN = GUICtrlCreateRadio("Case Num", 88, 48, 81, 17) GUICtrlSetState($optCN, $GUI_CHECKED) GUICtrlSetFont($optCN, 8, 800, 0, "MS Sans Serif") GUICtrlSetOnEvent($optCN, "optCNClick") $optMRN = GUICtrlCreateRadio("MRN/Date", 184, 48, 89, 17) GUICtrlSetFont($optMRN, 8, 800, 0, "MS Sans Serif") GUICtrlSetOnEvent($optMRN, "optMRNClick") GUICtrlCreateGroup("", -99, -99, 1, 1) $Logs = GUICtrlCreateEdit("", 8, 80, 481, 313) GUICtrlSetData($Logs, "Logs") GUICtrlSetOnEvent($Logs, "LogsChange") $Run = GUICtrlCreateGroup("", 408, 0, 81, 73) $btnRun = GUICtrlCreateButton("Run", 416, 16, 65, 49) GUICtrlSetFont($btnRun, 9, 800, 0, "MS Sans Serif") GUICtrlSetBkColor($btnRun, 0xA6CAF0) GUICtrlSetState($btnRun, $GUI_DISABLE) GUICtrlSetOnEvent($btnRun, "btnRunClick") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func btnPickFileClick() EndFunc Func btnRunClick() EndFunc Func CaseReprinterClose() EndFunc Func CaseReprinterMaximize() EndFunc Func CaseReprinterMinimize() EndFunc Func CaseReprinterRestore() EndFunc Func LogsChange() EndFunc Func optCNClick() EndFunc Func optMRNClick() EndFunc Func txtFilePathChange() EndFunc
Developers Jos Posted February 9, 2017 Developers Posted February 9, 2017 Why would it as you call a Func that doesn't do anything so simply returns and leaves the status as is. You need to close the with GUIDelete() in the called Func to close it. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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