• Fromel = Formel
    Ein Insider Gag aus unserer Klasse^^. Ein nettes Programm zum Rechnen.
    Freue mich auf Kritik :)
    Mfg und viel Spaß Nakroma

    Spoiler anzeigen
    [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;; Author: Nakroma
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <TabConstants.au3>
    #include <WindowsConstants.au3>
    $GUI = GUICreate("Fromel", 305, 210, 255, 125)
    $Tab1 = GUICtrlCreateTab(8, 8, 290, 190)
    $TabSheet1 = GUICtrlCreateTabItem("Prozent")
    $button1 = GUICtrlCreateButton("p% Prozentsatz", 24, 40)
    $button2 = GUICtrlCreateButton("W Prozentwert", 24, 80)
    $button3 = GUICtrlCreateButton("G Grundwert", 24, 120)
    $TabSheet2 = GUICtrlCreateTabItem("Körper")
    $button4 = GUICtrlCreateButton("Oktaeder", 24, 40)
    $button5 = GUICtrlCreateButton("Quadrat", 24, 80)
    $button6 = GUICtrlCreateButton("Dreieck", 24, 120)
    $TabSheet3 = GUICtrlCreateTabItem("Rechnungen")
    $button8 = GUICtrlCreateButton("Plus", 24, 40)
    $button9 = GUICtrlCreateButton("Minus", 24, 80)
    $button10 = GUICtrlCreateButton("Mal", 24, 120)
    $button11 = GUICtrlCreateButton("Geteilt", 24, 160)
    GUICtrlCreateTabItem("")
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $button1
    Prozentsatz()

    Case $button2
    Prozentwert()

    [/autoit] [autoit][/autoit] [autoit]

    Case $button3
    Grundwert()

    Case $button4
    Oktaeder()

    Case $button5
    Quadrat()

    Case $button6
    Dreieck()

    Case $button8
    Plus()

    Case $button9
    Minus()

    Case $button10
    Mal()

    Case $button11
    Geteilt()

    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func Prozentsatz()
    $pspw = InputBox("Fromel", "Bitte Prozentwert eingeben")
    If @error Then
    Return
    Endif
    $psgw = InputBox("Fromel", "Bitte Grundsatz eingeben")
    If @error Then
    Return
    Endif
    $ps = $pspw / $psgw
    MsgBox(0, "Fromel", "p%: " & $ps)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Prozentwert()
    $pwps = InputBox("Fromel", "Bitte Prozentsatz eingeben")
    If @error Then
    Return
    Endif
    $pwgw = InputBox("Fromel", "Bitte Grundwert eingeben")
    If @error Then
    Return
    Endif
    $pw = $pwgw * $pwps
    MsgBox(0, "Fromel", "W: " & $pw)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Grundwert()
    $gwpw = InputBox("Fromel", "Bitte Prozentwert eingeben")
    If @error Then
    Return
    Endif
    $gwps = InputBox("Fromel", "Bitte Prozentsatz eingeben")
    If @error Then
    Return
    Endif
    $gw = $gwpw / $gwps
    MsgBox(0, "Fromel", "G: " & $gw)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Oktaeder()
    $okt_a = InputBox("Fromel", "Bitte Seite a eingeben")
    If @error Then
    Return
    Endif
    $okt_b = InputBox("Fromel", "Bitte Seite b eingeben")
    If @error Then
    Return
    Endif
    $okt = $okt_a * 8 + $okt_b * 4
    MsgBox(0, "Fromel", "Umfang: " & $okt)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Quadrat()
    $quad_a = InputBox("Fromel", "Bitte Seite a eingeben")
    If @error Then
    Return
    Endif
    $quad_b = InputBox("Fromel", "Bitte Seite b eingeben")
    If @error Then
    Return
    Endif
    $quad = $quad_a * 2 + $quad_b * 2
    MsgBox(0, "Fromel", "Umfang: " & $quad)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Dreieck()
    $drei_a = InputBox("Fromel", "Bitte Seite a eingeben")
    If @error Then
    Return
    Endif
    $drei_b = InputBox("Fromel", "Bitte Seite b eingeben")
    If @error Then
    Return
    Endif
    $drei_c = InputBox("Fromel", "Bitte Seite c eingeben")
    If @error Then
    Return
    Endif
    $drei = $drei_a + $drei_b + $drei_c
    MsgBox(0, "Fromel", "Umfang: " & $drei)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Plus()
    $plus_a = InputBox("Fromel", "Bitte Zahl a eingeben")
    If @error Then
    Return
    Endif
    $plus_b = InputBox("Fromel", "Bitte Zahl b eingeben")
    If @error Then
    Return
    Endif
    $plus = $plus_a + $plus_b
    MsgBox(0, "Fromel", "+: " & $plus)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Minus()
    $min_a = InputBox("Fromel", "Bitte Zahl a eingeben")
    If @error Then
    Return
    Endif
    $min_b = InputBox("Fromel", "Bitte Zahl b eingeben")
    If @error Then
    Return
    Endif
    $min = $min_a - $min_b
    MsgBox(0, "Fromel", "-: " & $min)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Mal()
    $mal_a = InputBox("Fromel", "Bitte Zahl a eingeben")
    If @error Then
    Return
    Endif
    $mal_b = InputBox("Fromel", "Bitte Zahl b eingeben")
    If @error Then
    Return
    Endif
    $mal = $mal_a * $mal_b
    MsgBox(0, "Fromel", "*: " & $mal)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Geteilt()
    $get_a = InputBox("Fromel", "Bitte Zahl a eingeben")
    If @error Then
    Return
    Endif
    $get_b = InputBox("Fromel", "Bitte Zahl b eingeben")
    If @error Then
    Return
    Endif
    $get = $get_a / $get_b
    MsgBox(0, "Fromel", "/: " & $get)
    EndFunc

    [/autoit]