#region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Res_Fileversion=1.1.0.0 #AutoIt3Wrapper_Res_Language=1031 #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** HotKeySet("{/}", "dividieren") HotKeySet("{*}", "multiplizieren") HotKeySet("{+}", "addieren") HotKeySet("{-}", "subtrahieren") HotKeySet("{ENTER}", "gleich") HotKeySet("{NUMPAD1}", "nummer1") HotKeySet("{NUMPAD2}", "nummer2") HotKeySet("{NUMPAD3}", "nummer3") HotKeySet("{NUMPAD4}", "nummer4") HotKeySet("{NUMPAD5}", "nummer5") HotKeySet("{NUMPAD6}", "nummer6") HotKeySet("{NUMPAD7}", "nummer7") HotKeySet("{NUMPAD8}", "nummer8") HotKeySet("{NUMPAD9}", "nummer9") HotKeySet("{NUMPAD0}", "nummer0") HotKeySet("{NUMPADMULT}", "multiplizieren") HotKeySet("{NUMPADADD}", "addieren") HotKeySet("{NUMPADSUB}", "subtrahieren") HotKeySet("{NUMPADDIV}", "dividieren") HotKeySet("{NUMPADENTER}", "gleich") HotKeySet("{^}", "hoch") HotKeySet("{BACKSPACE}", "backspace") #region ### START Koda GUI section ### GUICreate("Rechner v1.1.0", 346, 313, 205, 145) GUICtrlCreateGroup("", 8, 8, 329, 41) $Label1 = GUICtrlCreateLabel("", 16, 23, 307, 20) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlCreateGroup("", -99, -99, 1, 1) $Input1 = GUICtrlCreateInput("", 8, 56, 329, 21) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetState(-1, 128) $Button1 = GUICtrlCreateButton("0", 8, 256, 107, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button2 = GUICtrlCreateButton("1", 8, 216, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button3 = GUICtrlCreateButton("2", 64, 216, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button4 = GUICtrlCreateButton("3", 120, 216, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button5 = GUICtrlCreateButton("4", 8, 176, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button6 = GUICtrlCreateButton("5", 64, 176, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button7 = GUICtrlCreateButton("6", 120, 176, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button8 = GUICtrlCreateButton("7", 8, 136, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button9 = GUICtrlCreateButton("8", 64, 136, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button10 = GUICtrlCreateButton("9", 120, 136, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button11 = GUICtrlCreateButton("/", 184, 96, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button12 = GUICtrlCreateButton("*", 184, 136, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button13 = GUICtrlCreateButton("-", 184, 176, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button14 = GUICtrlCreateButton("+", 184, 216, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button15 = GUICtrlCreateButton("=", 184, 256, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button16 = GUICtrlCreateButton("C", 8, 96, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button17 = GUICtrlCreateButton(",", 120, 256, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button18 = GUICtrlCreateButton("^", 120, 96, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button19 = GUICtrlCreateButton("+/-", 64, 96, 51, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button20 = GUICtrlCreateButton("(", 264, 96, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button21 = GUICtrlCreateButton(")", 264, 136, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button22 = GUICtrlCreateButton("Wurzel", 264, 176, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button23 = GUICtrlCreateButton("<-", 264, 216, 75, 33) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("©", 8, 292, 12, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Label3 = GUICtrlCreateLabel("Philipp Lehnhausen", 19, 293, 97, 17) $zahl1 = "0" GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 ExitLoop Case $Button16 $zahl1 = "" GUICtrlSetData($Label1, "") GUICtrlSetData($Input1, "") Case $Button2 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "1") Case $Button3 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "2") Case $Button4 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "3") Case $Button5 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "4") Case $Button6 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "5") Case $Button7 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "6") Case $Button8 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "7") Case $Button9 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "8") Case $Button10 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "9") Case $Button1 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "0") Case $Button17 If Not GUICtrlRead($Label1) = "" Then GUICtrlSetData($Label1, GUICtrlRead($Label1) & ".") Case $Button14 addieren() Case $Button13 subtrahieren() Case $Button12 multiplizieren() Case $Button11 dividieren() Case $Button18 hoch() Case $Button20 GUICtrlSetData($Label1, GUICtrlRead($Label1) & "(") Case $Button21 GUICtrlSetData($Label1, GUICtrlRead($Label1) & ")") Case $Button19 $zahl1 = GUICtrlRead($Label1) * (-1) GUICtrlSetData($Label1, $zahl1) GUICtrlSetData($Input1, $zahl1) Case $Button22 $zahl1 = Sqrt(GUICtrlRead($Label1)) GUICtrlSetData($Label1, $zahl1) GUICtrlSetData($Input1, $zahl1) Case $Button23 backspace() Case $Button15 gleich() EndSwitch WEnd Func nummer1() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "1") EndFunc ;==>nummer1 Func nummer2() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "2") EndFunc ;==>nummer2 Func nummer3() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "3") EndFunc ;==>nummer3 Func nummer4() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "4") EndFunc ;==>nummer4 Func nummer5() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "5") EndFunc ;==>nummer5 Func nummer6() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "6") EndFunc ;==>nummer6 Func nummer7() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "7") EndFunc ;==>nummer7 Func nummer8() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "8") EndFunc ;==>nummer8 Func nummer9() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "9") EndFunc ;==>nummer9 Func nummer0() GUICtrlSetData($Label1, GUICtrlRead($Label1) & "0") EndFunc ;==>nummer0 Func addieren() If Not GUICtrlRead($Label1) = "" Then GUICtrlSetData($Label1, GUICtrlRead($Label1) & " + ") EndFunc ;==>addieren Func subtrahieren() If Not GUICtrlRead($Label1) = "" Then GUICtrlSetData($Label1, GUICtrlRead($Label1) & " - ") EndFunc ;==>subtrahieren Func dividieren() If Not GUICtrlRead($Label1) = "" Then GUICtrlSetData($Label1, GUICtrlRead($Label1) & " / ") EndFunc ;==>dividieren Func multiplizieren() If Not GUICtrlRead($Label1) = "" Then GUICtrlSetData($Label1, GUICtrlRead($Label1) & " * ") EndFunc ;==>multiplizieren Func hoch() If Not GUICtrlRead($Label1) = "" Then GUICtrlSetData($Label1, GUICtrlRead($Label1) & " ^ ") EndFunc ;==>hoch Func backspace() If Not $Label1 = "" Then Local $str = StringTrimRight(GUICtrlRead($Label1), 1) GUICtrlSetData($Label1, $str) EndIf EndFunc ;==>backspace Func gleich() Local $result = Execute(GUICtrlRead($Label1)) GUICtrlSetData($Label1, $result) GUICtrlSetData($Input1, $result) EndFunc ;==>gleich