AutoIt-Quelltext
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Andi\Desktop\Autoit\Mittelwert rechner\mittelwert.kxf
$Form1 = GUICreate("Form1", 434, 104, 215, 156)
GUISetFont(8, 400, 0, "Comic Sans MS")
$Anzahl = GUICtrlCreateLabel("Hier tippe bitte die Anzahl der Werte ein: ", 8, 8, 263, 22)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
$Summe = GUICtrlCreateLabel("Hier tippe bitte die Summe der Werte ein:", 8, 40, 259, 22)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
$AEingabe = GUICtrlCreateInput("", 288, 8, 97, 25)
GUICtrlSetFont(-1, 9, 400, 0, "Comic Sans MS")
$SEingabe = GUICtrlCreateInput("", 288, 40, 97, 25)
GUICtrlSetFont(-1, 9, 400, 0, "Comic Sans MS")
$Exit = GUICtrlCreateButton("Beenden", 352, 72, 73, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetTip(-1, "Programm Beenden")
$Betragt = GUICtrlCreateLabel("Dein Ergebniss lautet:", 24, 72, 155, 23)
GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
$Ergebnis = GUICtrlCreateLabel("", 184, 72, 84, 20)
GUICtrlSetFont(-1, 9, 400, 0, "Comic Sans MS")
$Berechnen = GUICtrlCreateButton("Berechnen", 280, 72, 65, 25)
GUICtrlSetFont(-1, 9, 400, 0, "Comic Sans MS")
GUICtrlSetTip(-1, "Berechnen")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Exit
Exit
Case $Berechnen
GUICtrlSetData($Ergebnis,$SEingabe / $AEingabe)
EndSwitch
WEnd
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Andi\Desktop\Autoit\Mittelwert rechner\mittelwert.kxf
$Form1 = GUICreate ( "Form1" , 434 , 104 , 215 , 156 )
GUISetFont ( 8 , 400 , 0 , "Comic Sans MS" )
$Anzahl = GUICtrlCreateLabel ( "Hier tippe bitte die Anzahl der Werte ein: " , 8 , 8 , 263 , 22 )
GUICtrlSetFont ( - 1 , 10 , 400 , 0 , "Comic Sans MS" )
$Summe = GUICtrlCreateLabel ( "Hier tippe bitte die Summe der Werte ein:" , 8 , 40 , 259 , 22 )
GUICtrlSetFont ( - 1 , 10 , 400 , 0 , "Comic Sans MS" )
$AEingabe = GUICtrlCreateInput ( "" , 288 , 8 , 97 , 25 )
GUICtrlSetFont ( - 1 , 9 , 400 , 0 , "Comic Sans MS" )
$SEingabe = GUICtrlCreateInput ( "" , 288 , 40 , 97 , 25 )
GUICtrlSetFont ( - 1 , 9 , 400 , 0 , "Comic Sans MS" )
$Exit = GUICtrlCreateButton ( "Beenden" , 352 , 72 , 73 , 25 )
GUICtrlSetFont ( - 1 , 10 , 400 , 0 , "Comic Sans MS" )
GUICtrlSetTip ( - 1 , "Programm Beenden" )
$Betragt = GUICtrlCreateLabel ( "Dein Ergebniss lautet:" , 24 , 72 , 155 , 23 )
GUICtrlSetFont ( - 1 , 10 , 800 , 0 , "Comic Sans MS" )
$Ergebnis = GUICtrlCreateLabel ( "" , 184 , 72 , 84 , 20 )
GUICtrlSetFont ( - 1 , 9 , 400 , 0 , "Comic Sans MS" )
$Berechnen = GUICtrlCreateButton ( "Berechnen" , 280 , 72 , 65 , 25 )
GUICtrlSetFont ( - 1 , 9 , 400 , 0 , "Comic Sans MS" )
GUICtrlSetTip ( - 1 , "Berechnen" )
GUISetState ( @SW_SHOW )
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg ( )
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Exit
Exit
Case $Berechnen
GUICtrlSetData ( $Ergebnis , $SEingabe / $AEingabe )
EndSwitch
WEnd