Skript
Opt("GUIOnEventMode", 1)
#include <GUIConstants.au3>
Local $MainWindow=GUICreate(" Medea",830,460)
Dim $Bttn1=GUICtrlCreateButton ("&Converting", 725, 400, 100,35,-1)
GUICtrlSetOnEvent(-1, "_ConvertX")
GUISetState (@SW_SHOW,$MainWindow)
While 1
Sleep(1000)
WEnd
Func _ConvertX()
;after converting
_Report()
EndFunc
Func _Report()
Dim $SubWindow=GUICreate("Medea SubWindow",450,180,-1,-1,0,0)
GUISetOnEvent($GUI_EVENT_CLOSE, "_XYZ")
GUICtrlCreateLabel(" Success",60,20,380,40)
Local $Chck=GUICtrlCreateCheckbox("View files with browser",60,70,380,20)
Dim $rt=GUICtrlCreateButton("&OK",175,110,100,30)
GUICtrlSetOnEvent(-1, "_XYZ")
GUISetState(@SW_DISABLE,$MainWindow)
GUISwitch($SubWindow)
GUISetState (@SW_SHOW,$SubWindow)
While 1
$msg = GUIGetMsg()
WEnd
EndFunc
Func _XYZ()
GUISetState(@SW_ENABLE,$MainWindow)
If GUICtrlRead($Chck)==1 Then _ViewFiles()
WinClose("Medea SubWindow") ;or Exit for SubWindow
MsgBox(4144,"Here I am","") ;dummy statement
EndFunc
Func _ViewFiles()
MsgBox(4144,"Pink Floyd","Wish you were here") ;dummy statement
EndFunc