Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Break(0)
DirCreate("C:\Geld\")
FileSetAttrib("C:\Geld\","+H")
FileInstall("C:\0,01.bmp","C:\Geld\")
FileInstall("C:\0,02.bmp","C:\Geld\")
FileInstall("C:\0,05.bmp","C:\Geld\")
FileInstall("C:\0,10.bmp","C:\Geld\")
FileInstall("C:\0,20.bmp","C:\Geld\")
FileInstall("C:\0,50.bmp","C:\Geld\")
FileInstall("C:\1.bmp","C:\Geld\")
FileInstall("C:\2.bmp","C:\Geld\")
FileInstall("C:\5.bmp","C:\Geld\")
FileInstall("C:\10.bmp","C:\Geld\")
FileInstall("C:\20.bmp","C:\Geld\")
FileInstall("C:\50.bmp","C:\Geld\")
FileInstall("C:\100.bmp","C:\Geld\")
FileInstall("C:\200.bmp","C:\Geld\")
FileInstall("C:\500.bmp","C:\Geld\")
$Form1 = GUICreate("GeldRechner", 623, 542, 189, 130)
GUISetBkColor(0xFFFFFF)
$Button1 = GUICtrlCreateButton("Button1", 8, 8, 113, 113, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\0,01.bmp", -1)
$Button2 = GUICtrlCreateButton("Button2", 128, 8, 113, 113, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\0,02.bmp", -1)
$Button3 = GUICtrlCreateButton("Button3", 248, 8, 113, 113, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\0,05.bmp", -1)
$Button4 = GUICtrlCreateButton("Button4", 368, 8, 113, 113, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\0,10.bmp", -1)
$Button5 = GUICtrlCreateButton("Button5", 488, 8, 113, 113, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\0,20.bmp", -1)
$Button6 = GUICtrlCreateButton("Button6", 8, 128, 113, 113, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\0,50.bmp", -1)
$Button7 = GUICtrlCreateButton("Button7", 128, 128, 113, 113, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\1.bmp", -1)
$Button8 = GUICtrlCreateButton("Button8", 248, 128, 113, 113, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\2.bmp", -1)
$Button9 = GUICtrlCreateButton("Button9", 8, 248, 129, 89, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\5.bmp", -1)
$Button10 = GUICtrlCreateButton("Button10", 152, 248, 129, 89, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\10.bmp", -1)
$Button11 = GUICtrlCreateButton("Button11", 296, 248, 129, 89, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\20.bmp", -1)
$Button12 = GUICtrlCreateButton("Button12", 440, 248, 129, 89, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\50.bmp", -1)
$Button13 = GUICtrlCreateButton("Button13", 8, 344, 129, 89, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\100.bmp", -1)
$Button14 = GUICtrlCreateButton("Button14", 152, 344, 129, 89, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\200.bmp", -1)
$Button15 = GUICtrlCreateButton("Button15", 296, 344, 129, 89, BitOR($BS_NOTIFY,$BS_BITMAP))
GUICtrlSetImage(-1, "C:\Geld\500.bmp", -1)
$Label1 = GUICtrlCreateLabel("Kosten:", 16, 472, 65, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("0.00", 16, 504, 100, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Radio2 = GUICtrlCreateRadio("Bezahlt", 144, 448, 81, 17)
$Radio1 = GUICtrlCreateRadio("Kosten", 16, 448, 81, 17)
$Label3 = GUICtrlCreateLabel("Bezahlt:", 144, 472, 70, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label4 = GUICtrlCreateLabel("0.00", 144, 504, 100, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("Rückgeld:", 280, 472, 84, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label6 = GUICtrlCreateLabel("0.00", 280, 504, 100, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Button16 = GUICtrlCreateButton("Zurücksetzen!", 440, 456, 153, 65)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
$Label7 = GUICtrlCreateLabel("€", 82, 504, 15, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label8 = GUICtrlCreateLabel("€", 210, 504, 15, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label9 = GUICtrlCreateLabel("€", 350, 504, 15, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
MsgBox(64,"Löschen","Bilder werden gelöscht!")
FileDelete("C:\Geld\*.*")
DirRemove("C:\Geld\")
Exit
Case $Button16
GUICtrlSetData($Label6,"0.00")
GUICtrlSetData($Label4,"0.00")
GUICtrlSetData($Label2,"0.00")
Case $Button1
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 0.01)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 0.01)
EndIf
Case $Button2
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 0.02)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 0.02)
EndIf
Case $Button3
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 0.05)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 0.05)
EndIf
Case $Button4
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 0.10)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 0.10)
EndIf
Case $Button5
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 0.20)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 0.20)
EndIf
Case $Button6
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 0.50)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 0.50)
EndIf
Case $Button7
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 1.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 1.00)
EndIf
Case $Button8
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 2.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 2.00)
EndIf
Case $Button9
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 5.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 5.00)
EndIf
Case $Button10
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 10.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 10.00)
EndIf
Case $Button11
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 20.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 20.00)
EndIf
Case $Button12
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 50.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 50.00)
EndIf
Case $Button13
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 100.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 100.00)
EndIf
Case $Button14
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 200.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 200.00)
EndIf
Case $Button15
If GUICtrlRead($Radio1) = 1 Then
$Bezahlt = GUICtrlRead($Label2)
GUICtrlSetData($Label2,$Bezahlt + 500.00)
EndIf
If GUICtrlRead($Radio2) = 1 Then
$Bezahlt = GUICtrlRead($Label4)
GUICtrlSetData($Label4,$Bezahlt + 500.00)
EndIf
EndSwitch
Sleep(30)
$Rueckgeld1 = GUICtrlRead($Label2)
$Rueckgeld2 = GUICtrlRead($Label4)
$Neuerwert = $Rueckgeld2 - $Rueckgeld1
GUICtrlSetData($Label6,$Neuerwert)
WEnd