﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
409	Checkbox check goes to Select Case while not programmed to do so	Triblade		"First, this script is a copied script of somebody I tried to help url: http://www.autoitscript.com/forum/index.php?showtopic=74538

Go to the menu, choose A. Then a new GUI is made and the old one deleted.
Then you see 3 checkboxes. When I press the 3rd one ('C') the Case $msg = $A (the Case where the second GUI is made) is run by again.
I can't figure out why. I think this is a bug.
Why? Because when $Start = GUICtrlCreateButton is put before $Checkbox1 = GUICtrlCreateCheckbox it just works fine.
Also if $how = GUICtrlCreateButton is uncommented there is no fault anymore.

{{{
#include <GUIConstants.au3>

Dim $Checkbox1, $Checkbox2, $Checkbox3

HotKeySet(""{F1}"", ""How"")

$gui = GUICreate(""Update Addons - Menu"", 300, 300)  

;$how = GUICtrlCreateButton( ""How To Use"", 0, 10)

$Start = GUICtrlCreateButton(""Start Selected"", 281, 370 , 120, 30)

$Menu = GUICtrlCreateMenu (""Menu"")
$A = GUICtrlCreateMenuitem (""A"",$Menu)

GUISetState (@SW_SHOW)

While 1
	$msg = GUIGetMsg()
	Select
		Case $msg = $GUI_EVENT_CLOSE
			ExitLoop
		Case $Msg = $Start
			$Read = GUICtrlRead($Checkbox1);start
			If $Read = $GUI_CHECKED Then
				RunWait(""notepad"")
				Sleep(2000)
			EndIf
			$Read = GUICtrlRead($Checkbox2);start
			If $Read = $GUI_CHECKED Then
				RunWait('""' & @ProgramFilesDir & '\Internet Explorer\IEXPLORE.EXE""')
				Sleep(2000)
			EndIf;end
			$Read = GUICtrlRead($Checkbox3)
			If $Read = $GUI_CHECKED Then
				RunWait(""notepad"")
				Sleep(2000)
			EndIf
		Case $msg = $A
			msgbox(0,"""",""Second GUI"")
			;$title = WinGetTitle( ""Update Mods -"")
			Guidelete($gui)
			$gui2 = GUICreate(""Update Addons - A"", 700, 500)
			
			$Checkbox1 = GUICtrlCreateCheckbox(""A"", 20, 5)
			$Checkbox2 = GUICtrlCreateCheckbox(""B"", 20, 25)
			$Checkbox3 = GUICtrlCreateCheckbox(""C"", 20, 45)
			
			$Start = GUICtrlCreateButton(""Start Selected"", 281, 370 , 120, 30)
			
			GUISetState (@SW_SHOW)
	EndSelect
Wend

Func quit()
	exit    
EndFunc

Func How()
	msgbox(0, ""title"", ""text"")
EndFunc
}}}"	Bug	closed		AutoIt	3.2.13.3	None	No Bug		
