#include #include #include #include #include ;Start GUI includes #include #include #include #include #include #include #include #include #include Global $idComboBox Example() Func Example() Local $sTitle = "CPS" Local $hGUI = GUICreate($sTitle, 320, 360) ;320, 360 $idZakaznikComboBox = GUICtrlCreateCombo("Kaufland", 10, 10, 205, 20) GUICtrlSetData($idZakaznikComboBox, "Tesco|Albert|Interní / RMC|Qanto|Penny|LIDL|Log Point|Billa|Makro|Globus|Ostatní|Nagel|HAVI|DC Kaufland") $idComboBox = GUICtrlCreateCombo("A", 10, 40, 205,20) GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlSetData($idComboBox, "Z") GUICtrlSetResizing($idComboBox, $GUI_DOCKLEFT) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) ;---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Global $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) Global $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) GUICtrlCreateLabel("Problem", 10, 240, 205, 20) ; first cell 70 width Local $idInput1 = GUICtrlCreateInput("", 10, 255, 205, 20) GUICtrlSetLimit($idInput1, 500) ; Set the limit to 500 characters Local $idClose = GUICtrlCreateButton("Close", 212, 318, 85, 25) Local $idGO = GUICtrlCreateButton("GO", 102, 318, 85, 25) Local $option = GUICtrlRead($idComboBox) Local $iError = 0 Local $hCancel Local $hOkay Local $prevText = "" ;$truelivetext = GUICtrlRead($idComboBox) & "_" & GUICtrlRead($idDate) & "_" & GUICtrlRead($idInput1) $liveupdatelable = GUICtrlCreateLabel("", 13, 290, 500, 25) GUISetState(@SW_SHOW, $hGUI) $dll = DllOpen("user32.dll") $previousText = "" $banlist = '_' $sPrevUserInput = "" $iError = 0 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClose ExitLoop Case _GuiCtrlGetFocus($hGUI) = $idComboBox If _IsPressed("0D") Then DoCmd() EndIf Case $idGO If StringInStr(GUICtrlRead($idInput1), "_") Then MsgBox($MB_SYSTEMMODAL, "VAROVÁNÍ", "Popis problému NESMÍ obsahovat '' _ ''", 10) EndIf If Not StringInStr(GUICtrlRead($idInput1), "_") Then ClipPut(GUICtrlRead($idComboBox) & "_" & GUICtrlRead($idDate) & "_" & GUICtrlRead($idInput1)) MsgBox($MB_SYSTEMMODAL, "Title", "Vloženo do clip boardu. Okno se zavre za 10sec" & @CRLF & GUICtrlRead($idComboBox) & "_" & GUICtrlRead($idDate) & "_" & GUICtrlRead($idInput1), 10) GUICtrlSetData($idInput1, "") EndIf Case $idZakaznikComboBox If GUICtrlRead($idZakaznikComboBox) = "Albert" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205, 20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlSetData($idComboBox, "D2") GUICtrlSetData($idComboBox, "E") GUICtrlSetData($idComboBox, "I") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("2 hodiny" & @CRLF & "vysoká teplota na více jak 25% nábytku" & @CRLF & "centrální výpadek chlazení" & @CRLF & "výpaden PC" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 2, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Kaufland" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlSetData($idComboBox, "Z") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Tesco" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") $idProblemLabel = GUICtrlCreateLabel("6 hodin" & @CRLF & "vysoká teplota na více jak 25% nábytku" & @CRLF & "centrální výpadek chlazení", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 6, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Interní / RMC" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "S") GUICtrlSetData($idComboBox, "X") GUICtrlSetData($idComboBox, "P") GUICtrlSetData($idComboBox, "P7") GUICtrlSetData($idComboBox, "R") $idProblemLabel = GUICtrlCreateLabel("PARTNERI", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Ostatní" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Qanto" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "centrální výpadek chlazení" & @CRLF & "výpadek PC" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Penny" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "LIDL" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu" & @CRLF & "systémový alarm prio 1", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Log Point" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "Z") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu" & @CRLF & "systémový alarm prio 1", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Billa" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "plocha" & @CRLF & "zásuvky" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "skj v alarmu" & @CRLF & "plug-in" & @CRLF & "havárie- 4hodiny SO, DEN, NOC", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Makro" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlSetData($idComboBox, "Z") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "BOX" & @CRLF & "plocha" & @CRLF & "zásuvky" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "SKJ v alarmu" & @CRLF & "plug-in" & @CRLF & "havárie- 4hodiny SO, DEN, NOC" & @CRLF & "NK", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Globus" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlSetData($idComboBox, "Z") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "Havarie - 4 hodiny SO, NE, NOC" & @CRLF & "ZÁSUVKY" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "SKJ v alarmu" & @CRLF & "PLUG-IN" & @CRLF & "Prodejní plocha" & @CRLF & "Mrazící box", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "Nagel" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlSetData($idComboBox, "Z") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "Havarie - 4 hodiny SO, NE, NOC" & @CRLF & "SKJ v alarmu" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "Ucpané odpady - kape na zboží" & @CRLF & "Výparník - kape, poškozený", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "HAVI" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlSetData($idComboBox, "Z") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "Havarie - 4 hodiny SO, NE, NOC" & @CRLF & "SKJ v alarmu" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "Ucpané odpady - kape na zboží" & @CRLF & "Výparník - kape, poškozený", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idZakaznikComboBox) = "DC Kaufland" Then GUICtrlDelete($idComboBox) GUICtrlDelete($idProblemLabel) $idComboBox = GUICtrlCreateCombo($option, 10, 40, 205,20) GUICtrlSetData($idComboBox, "A") GUICtrlSetData($idComboBox, "B") GUICtrlSetData($idComboBox, "C") GUICtrlSetData($idComboBox, "D") GUICtrlSetData($idComboBox, "Z") GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "Havarie - 4 hodiny SO, NE, NOC" & @CRLF & "SKJ v alarmu" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "Ucpané odpady - kape na zboží" & @CRLF & "Výparník - kape, poškozený", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf GUICtrlSetData($idInput1, "") Case $idComboBox GUICtrlDelete($idProblemLabel) GUICtrlDelete($idDate) If GUICtrlRead($idZakaznikComboBox) = "Albert" Then GUICtrlDelete($idProblemLabel) If GUICtrlRead($idComboBox) = "A" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("2 hodiny" & @CRLF & "vysoká teplota na více jak 25% nábytku" & @CRLF & "centrální výpadek chlazení" & @CRLF & "výpaden PC" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 2, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "veškeré standartní servisní činnosti ", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "opravy bez vysokých teplot" & @CRLF & "výměna dílů", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("48 hodin" & @CRLF & "preventivní prohlídka" & @CRLF & "revize úniků", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 48, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D2" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("30 dní", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "E" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("30 dní", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "I" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("", 10, 70) $idDate = GUICtrlCreateDate("30 dní", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Ostatní" Then GUICtrlDelete($idProblemLabel) If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "jeden kompresor v alarmu (pokud jsou na prodejně 3 a více MK)", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("48 hodin" & @CRLF & "dveře" & @CRLF & "kosmetické vady", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 48, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then $idProblemLabel = GUICtrlCreateLabel("30 dní" & @CRLF & "požadavky zákazníka na dodání náhradních dílů", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Kaufland" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf GUICtrlSetData($idDate, $newdate) If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "jeden kompresor v alarmu" & @CRLF & "(pokud jsou na prodejně 3 a více MK)", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("48 hodin" & @CRLF & "dveře" & @CRLF & "kosmetické závady, tekoucí voda, ucpaný odpad", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 48, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then $idProblemLabel = GUICtrlCreateLabel("30 dní" & @CRLF & "požadavky zákazníka na dodání náhradních dílů", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "Z" Then $idProblemLabel = GUICtrlCreateLabel("12 hodin" & @CRLF & "ZÁSUVKY" & @CRLF & "PLUG-IN" & @CRLF & "PŘÍRUČNÍ MRAZÁKY" & @CRLF & "MULTINORY" & @CRLF & "BOBULOVINY" & @CRLF & "ZELENINA" & @CRLF & "OPTIMER", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 12, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Tesco" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("6 hodin" & @CRLF & "vysoká teplota na více jak 25% nábytku" & @CRLF & "centrální výpadek chlazení", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 6, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("48 hodin" & @CRLF & "vysoká teplota" & @CRLF & "veškeré standartní servisní činnosti ", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 48, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("14 dní" & @CRLF & "odstranění závad po revizi/kontrole" & @CRLF & "dodání ND", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 14, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then $idProblemLabel = GUICtrlCreateLabel("30 dní" & @CRLF & "preventivní prohlídka" & @CRLF & "revize úniků" & @CRLF & "sanitace", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Interní / RMC" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("PARTNERI", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "S" Then $idProblemLabel = GUICtrlCreateLabel("30 dní" & @CRLF & "PARTNERI", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "X" Then $idProblemLabel = GUICtrlCreateLabel("30 dní" & @CRLF & "KAS" & @CRLF & "AREA LEADER" & @CRLF & "SVL" & @CRLF & "SI" & @CRLF & "OBECNE CARRIER POŽADAVKY", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "P" Then $idProblemLabel = GUICtrlCreateLabel("PLÁNOVANÝ VÝJEZD", 10, 70) $idDate = GUICtrlCreateDate("30 dní" , 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "P7" Then $idProblemLabel = GUICtrlCreateLabel("PLÁNOVANÝ VÝJEZD 7 DNÍ" & @CRLF & "- S DOJEZDOVÝM ČASEM 7 DNÍ", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 7, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "R" Then $idProblemLabel = GUICtrlCreateLabel("30 dní" & @CRLF & "REVIZE ÚNIKU PO SERVISNÍM ZÁSAHU", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Qanto" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "centrální výpadek chlazení" & @CRLF & "výpadek PC" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "veškeré standartní servisní činnosti" & @CRLF & "opravy bez vysokých teplot" & @CRLF & "výměna dílů" & @CRLF & "preventivní prohlídka" & @CRLF & "revize úniků", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Penny" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "jeden kompresor v alarmu(pokud jsou na prodejně 3 a více MK)" & @CRLF & "tekoucí voda" & @CRLF & "požadavky SZPI", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("48 hodin" & @CRLF & "dveře" & @CRLF & "kosmetické vady" & @CRLF & "osvětlení" & @CRLF & "námrazy", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 48, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "LIDL" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu" & @CRLF & "systémový alarm prio 1", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "systémový alarm prio 2", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("72 hodin" & @CRLF & "boxové dveře např. NFK" & @CRLF & "nedostatek chladiva jednotky", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 72, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then $idProblemLabel = GUICtrlCreateLabel("12 hodin" & @CRLF & "zásuvky" & @CRLF & "plug-in" & @CRLF & "příruční mrazáky" & @CRLF & "multinory" & @CRLF & "bobuloviny" & @CRLF & "zelenina" & @CRLF & "optimer", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 12, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Log Point" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "vysoká teplota" & @CRLF & "výpadek PC" & @CRLF & "HD" & @CRLF & "obecně alarmy ohrožující teploty" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "dva a více kompresory v alarmu" & @CRLF & "systémový alarm prio 1", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "systémový alarm prio 2" & @CRLF & "čidla" & @CRLF & "porucha neohrožující teploty", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "Z" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "zásuvky" & @CRLF & "plug-in" & @CRLF & "příruční mrazáky" & @CRLF & "multinory" & @CRLF & "bobuloviny" & @CRLF & "zelenina" & @CRLF & "optimer", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Billa" Then GUICtrlDelete($idProblemLabel) If GUICtrlRead($idComboBox) = "A" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "plocha" & @CRLF & "zásuvky" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "skj v alarmu" & @CRLF & "plug-in" & @CRLF & "havárie- 4hodiny SO, DEN, NOC", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("24 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("48 hodin" & @CRLF & "dveře" & @CRLF & "kosmetické závady", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 48, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("požadavky zákazníka na dodání náhradních dílů ", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Makro" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "BOX" & @CRLF & "plocha" & @CRLF & "zásuvky" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "SKJ v alarmu" & @CRLF & "plug-in" & @CRLF & "havárie- 4hodiny SO, DEN, NOC" & @CRLF & "NK", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) If GUICtrlRead($idComboBox) = "A" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "BOX" & @CRLF & "plocha" & @CRLF & "zásuvky" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "SKJ v alarmu" & @CRLF & "plug-in" & @CRLF & "havárie- 4hodiny SO, DEN, NOC" & @CRLF & "NK", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("8 hodin" & @CRLF & "NK" & @CRLF & "méně závažné", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 8, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "dveře" & @CRLF & "kosmetické závady", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("požadavky zákazníka na dodání náhradních dílů ", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "Z" Then GUICtrlDelete($idProblemLabel) $idProblemLabel = GUICtrlCreateLabel("12 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 12, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Globus" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "Havarie - 4 hodiny SO, NE, NOC" & @CRLF & "ZÁSUVKY" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "SKJ v alarmu" & @CRLF & "PLUG-IN" & @CRLF & "Prodejní plocha" & @CRLF & "Mrazící box", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("8 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 8, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "dveře" & @CRLF & "kosmetické závady", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then $idProblemLabel = GUICtrlCreateLabel("požadavky zákazníka na dodání náhradních dílů ", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "Z" Then $idProblemLabel = GUICtrlCreateLabel("12 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 12, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "Nagel" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "Havarie - 4 hodiny SO, NE, NOC" & @CRLF & "SKJ v alarmu" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "Ucpané odpady - kape na zboží" & @CRLF & "Výparník - kape, poškozený", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("8 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 8, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "dveře" & @CRLF & "kosmetické závady", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then $idProblemLabel = GUICtrlCreateLabel("", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "Z" Then $idProblemLabel = GUICtrlCreateLabel("12 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 12, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "HAVI" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "Havarie - 4 hodiny SO, NE, NOC" & @CRLF & "SKJ v alarmu" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "Ucpané odpady - kape na zboží" & @CRLF & "Výparník - kape, poškozený", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("8 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 8, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin" & @CRLF & "dveře" & @CRLF & "kosmetické závady", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then $idProblemLabel = GUICtrlCreateLabel("", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "Z" Then $idProblemLabel = GUICtrlCreateLabel("12 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 12, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf If GUICtrlRead($idZakaznikComboBox) = "DC Kaufland" Then If GUICtrlRead($idComboBox) = "A" Then $idProblemLabel = GUICtrlCreateLabel("4 hodiny" & @CRLF & "TK" & @CRLF & "NK" & @CRLF & "Havarie - 4 hodiny SO, NE, NOC" & @CRLF & "SKJ v alarmu" & @CRLF & "nedostatek chladiva jednotky" & @CRLF & "Ucpané odpady - kape na zboží" & @CRLF & "Výparník - kape, poškozený", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 4, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "B" Then $idProblemLabel = GUICtrlCreateLabel("8 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 8, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "C" Then $idProblemLabel = GUICtrlCreateLabel("24 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 24, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "D" Then $idProblemLabel = GUICtrlCreateLabel("", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('d', 30, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf If GUICtrlRead($idComboBox) = "Z" Then $idProblemLabel = GUICtrlCreateLabel("12 hodin", 10, 70) $idDate = GUICtrlCreateDate("", 10, 210, 160, 26, $DTS_SHORTDATEFORMAT) $sStyle = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) $newdate = _DateAdd('h', 12, _NowCalc()) GUICtrlSetData($idDate, $newdate) Local $sStyle = "dd.MM.yyyy HH:mm" GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) EndIf EndIf EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example Func DoCmd() Local $val $val = GUICtrlRead($idComboBox) GUICtrlSetData($idComboBox, $val) ConsoleWrite("executing " & $val) Sleep(100) ; Important - thanks Mikell , otherwise you get repeats ; MsgBox(4096, "ComboBox", "Enter Pressed") EndFunc ;==>DoCmd Func _GuiCtrlGetFocus($GuiRef) Local $hwnd = ControlGetHandle($GuiRef, "", ControlGetFocus($GuiRef)) Local $result = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hwnd) Return $result[0] EndFunc ;==>_GuiCtrlGetFocus