Hallo liebe Community
hier im Forum hatte kürzlich jemand eine frage in Hilfe forum dabei ging es um eine art kontorechner für den PC, ich fand diese Idee echt super und habe mein eigenen geschrieben.
Funktionen :
einnahmen eintragen, ausgaben abziehen,passwortabfrage, mehrere "Konten " möglich.
Für konstruktive Kritik bedanke ich mich schon mal im vorraus
MFG Eistee
Source :
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Sound.au3>
#NoTrayIcon
$size = FileGetSize("C:\BS\konto\close.jpg")
If $size = 0 then _1 ()
Func _1 ()
DirCreate("C:\BS\konto\")
Fileinstall("ktn.txt", "C:\BS\konto\ktn.txt")
Fileinstall("kasse.mp3", "C:\BS\konto\kasse.mp3")
Fileinstall("Stand1.txt", "C:\BS\konto\Stand1.txt")
Fileinstall("Stand1.txt", "C:\BS\konto\Stand1.txt")
Fileinstall("BG.jpg", "C:\BS\konto\BG.jpg")
FileInstall("Button1.jpg", "C:\BS\konto\Button1.jpg")
FileInstall("Button2.jpg", "C:\BS\konto\Button2.jpg")
Fileinstall("setting.jpg", "C:\BS\konto\setting.jpg")
Fileinstall("rahmen.jpg", "C:\BS\konto\rahmen.jpg")
FileInstall("mini.jpg", "C:\BS\konto\mini.jpg")
FileInstall("close.jpg", "C:\BS\konto\close.jpg")
EndFunc
$fre = "C:\BS\konto\ktn.txt"
$PWuu = "C:\BS\konto\PW.txt"
$nr = FileReadLine($fre,1)
$file = "C:\BS\konto\Stand"& $nr &".txt"
$Stand = FileReadLine($file,1)
$size88 = FileGetSize("C:\BS\konto\PW.txt")
If $size88 = 0 then _2 ()
Func _2 ()
$p = InputBox ("Passwort", "Wählen Sie ihr Passwort")
$file9 = FileOpen($PWuu,2)
FileWriteLine($file9,$p)
FileClose($file9)
EndFunc
$PWu = FileReadLine($PWuu,1)
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("PrivatKonto", 600, 200, -1, -1,$WS_POPUP)
[/autoit] [autoit][/autoit] [autoit]$BG = GUICtrlCreatePic("C:\BS\konto\BG.jpg",0 ,0 ,600 ,200,$WS_DISABLED)
$Button1 = GUICtrlCreatePic("C:\BS\konto\Button1.jpg", 30, 60, 200, 50)
$Button2 = GUICtrlCreatePic("C:\BS\konto\Button2.jpg", 370, 60, 200, 50)
$Set = GUICtrlCreatePic("C:\BS\konto\setting.jpg", 4, 4, 71, 20)
$ra = GUICtrlCreatePic("C:\BS\konto\rahmen.jpg",528 ,4 ,68 ,20,$WS_DISABLED)
$mi = GUICtrlCreatePic("C:\BS\konto\Mini.jpg",530 ,6 ,20 ,16)
$cl = GUICtrlCreatePic("C:\BS\konto\Close.jpg",574 ,6 ,20 ,16)
GUISetBkColor(0x000000)
$Input1 = GUICtrlCreateInput($Stand, 225, 144, 150, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$Label1 = GUICtrlCreateLabel("Aktueller Stand", 230, 124, 150, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlCreateLabel("",0,0,600,200,0,$GUI_WS_EX_PARENTDRAG)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUISetState(@SW_HIDE)
[/autoit] [autoit][/autoit] [autoit]$PW = InputBox ("Passwort", "Ihr Passwort Bitte")
If Not $PW = $PWu Then
SplashTextOn("", "Falsches Passwort", 250, 45, -1, -1, 1, "", 12)
Sleep(500)
SplashOff()
Exit
EndIf
SoundPlay("kasse.mp3",0)
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $cl
_AnimButton ($Form1, $cl)
Exit
Case $mi
_AnimButton ($Form1, $mi)
GUISetState(@SW_MINIMIZE)
Case $Button1
_AnimButton ($Form1, $Button1)
_ein ()
Case $Button2
_AnimButton ($Form1, $Button2)
_aus ()
Case $set
_AnimButton ($Form1, $set)
_ktn ()
EndSwitch
WEnd
Func _ktn ()
$nrt = InputBox ("Kontonummer", "Sie können sich mehrere Konten anlegen, oder auf ein bestehendes zugreifen. Nach jedem Wechsel muss das Programm nei gestartet werden.")
$file2 = FileOpen($fre,2)
FileWriteLine($file2,$nrt)
FileClose($file2)
Exit
Endfunc
Func _ein ()
$ein = InputBox ("Einzahlung", "Wie hoch ist der Betrag")
$Standj = FileReadLine($file,1)
$Standn = $Standj+$ein
$file2 = FileOpen($file,2)
FileWriteLine($file2,$Standn)
FileClose($file2)
GUICtrlSetData ($Input1, $Standn)
EndFunc
Func _AnimButton($IDgui, $IDbtn, $delay=300)
Local $pos = ControlGetPos($IDgui, '', $IDbtn)
Local $pWin = WinGetPos($IDgui)
ControlMove($IDgui, '', $IDbtn, $pos[0], $pos[1]+1, $pos[2]-1, $pos[3]-1)
Sleep($delay)
ControlMove($IDgui, '', $IDbtn, $pos[0], $pos[1], $pos[2], $pos[3])
EndFunc
Func _aus ()
$aus = InputBox ("Abhebung", "Wie hoch ist der Betrag")
$Standj = FileReadLine($file,1)
$Standn = $Standj-$aus
$file2 = FileOpen($file,2)
FileWriteLine($file2,$Standn)
FileClose($file2)
GUICtrlSetData ($Input1, $Standn)
EndFunc