;Creator: Eedis
;Email: Killerbender53@yahoo.com
Gui, 2:Color, FF8040
Gui, 2:Font, S10 CGreen Bold, Arial
Gui, 2:Add, Edit, vglogin x13 y39 w130 h20 , Username
Gui, 2:Add, Edit, vgpassword x13 y69 w130 h20 , Password
Gui, 2:Add, Text, x5 y4 w140 h30 , Enter your username and password.
Gui, 2:Add, Button, ggo x28 y99 w100 h30 , Sign in
Gui, 2:Show, w161 h141, Sign in
Return
main:
gosub, readini
Menu, FileMenu, Add, Add username, adduser
Menu, FileMenu, Add, Change password, changepass
Menu, MyMenuBar, Add, File, :Filemenu
Menu, MyMenuBar, Add, Exit
Gui, Menu, MyMenuBar
Gui, Color, FF8040
Gui, Font, S44 CGreen Bold, Papyrus
Gui, Add, Text, x61 y20 w269 h84 +BackgroundTrans, E-Money
Gui, Font, S12 CGreen Bold, Arial
Gui, Add, Text, x-4 y90 w460 h24 +BackgroundTrans, ______________________________________________________
Gui, Add, ListView, x14 y120 w363 h337 , Label|Amount|Date Added|Type
Gui, Add, Text, x260 y463 w82 h18 , Total: $
Gui, Add, Text, x10 y493 w49 h18 , Label:
Gui, Add, Text, x10 y532 w82 h18 +BackgroundTrans, Amount: $
Gui, Font, S8 CGreen Bold, Arial
Gui, Add, Edit, vnewtotal x317 y463 w60 h18 , %total%
Gui, Add, Edit, vlabel x61 y493 w177 h18 , Label or comments.
Gui, Add, Edit, vamount x89 y532 w149 h18 , 0.00
Gui, Font, S24 CGreen Bold, Arial
Gui, Add, Button, gplus x245 y491 w60 h60 , +
Gui, Add, Button, gminus x317 y491 w60 h60 , -
Gui, Show, w394 h568, E-Money
gosub, gatherinfo
Return
adduser:
suspend, off
Gui, 3:Color, FF8040
Gui, 3:Font, S10 CGreen Bold, Arial
Gui, 3:Add, Text, x6 y0 w160 h40 , Enter your new username and password.
Gui, 3:Add, Edit, vusername3 x6 y40 w160 h20 , Username
Gui, 3:Add, Edit, vpassword3 x6 y70 w160 h20 , Password
Gui, 3:Add, Button, gAdd x36 y100 w100 h30 , Add
Gui, 3:Show, w175 h139, Add user
Return
changepass:
suspend, off
Gui, 4:Color, FF8040
Gui, 4:Font, S10 CGreen Bold, Arial
Gui, 4:Add, Text, x6 y0 w160 h60 , Enter the username, original password, and new password.
Gui, 4:Add, Edit, vusername4 x6 y60 w160 h20 , Username
Gui, 4:Add, Edit, vorgpassword x6 y90 w160 h20 , Original Password
Gui, 4:Add, Edit, vpassword4 x6 y120 w160 h20 , New Password
Gui, 4:Add, Button, gchange x36 y150 w100 h30 , Change
Gui, 4:Show, w175 h189, Change user password
Return
readini:
keynum=0
iniread, total, %A_windir%\system32\%user%.ini, total, total
Loop
{
iniread, test, %A_windir%\system32\%user%.ini, money%A_index%, label
iniread, label%A_index%, %A_windir%\system32\%user%.ini, money%A_index%, label
iniread, amount%A_index%, %A_windir%\system32\%user%.ini, money%A_index%, amount
iniread, added%A_index%, %A_windir%\system32\%user%.ini, money%A_index%, added
iniread, type%A_index%, %A_windir%\system32\%user%.ini, money%A_index%, type
if (test = "ERROR")
Break
Else
keynum+=1
}
Return
GatherInfo:
Loop %keynum%
LV_Add("", label%A_index%, amount%A_index%, added%A_index%, type%A_Index%)
LV_ModifyCol()
Return
add:
suspend, on
gui, 3:submit
gui, 3:destroy
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\E-Money, %username3%, %password3%
iniwrite, 00.00, %A_windir%\system32\%username3%.ini, total, total
Return
change:
suspend, on
gui, 4:submit
gui, 4:destroy
regread, password, HKEY_LOCAL_MACHINE, SOFTWARE\E-Money, %username4%
if (orgpassword = password)
RegDelete, HKEY_LOCAL_MACHINE, SOFTWARE\E-Money, %username4%
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\E-Money, %username4%, %password4%
Return
Go:
gui, 2:submit
gui, 2:destroy
user=%glogin%
loop, HKEY_LOCAL_MACHINE, Software\E-Money
{
if (A_LoopRegName = glogin)
{
regread, password, HKEY_LOCAL_MACHINE, SOFTWARE\E-Money, %glogin%
if (password = gpassword)
{
suspend, on
goto, main
}
}
}
MsgBox, 48, Invalid login or password., The login or password you have provided is incorrect.
Reload
Return
Plus:
gui, submit, nohide
loop 1
{
newtotal+=amount
if (total = newtotal)
{
MsgBox, 48, Invalid submission, The amount you have entered is an invalid amount.
Break
}
date=%A_MM%/%A_DD%/%A_yyyy%
keynum+=1
iniwrite, %newtotal%, %A_windir%\system32\%user%.ini, total, total
iniwrite, %label%, %A_windir%\system32\%user%.ini, money%keynum%, Label
iniwrite, %amount%, %A_windir%\system32\%user%.ini, money%keynum%, amount
iniwrite, %Date%, %A_windir%\system32\%user%.ini, money%keynum%, added
iniwrite, Deposit, %A_windir%\system32\%user%.ini, money%keynum%, type
LV_Delete()
gosub, readini
gosub, gatherinfo
Guicontrol, , newtotal, %newtotal%
}
Return
Minus:
gui, submit, nohide
loop 1
{
newtotal-=amount
if (total = newtotal)
{
MsgBox, 48, Invalid submission, The amount you have entered is an invalid amount.
Break
}
date=%A_MM%/%A_DD%/%A_yyyy%
keynum+=1
iniwrite, %newtotal%, %A_windir%\system32\%user%.ini, total, total
iniwrite, %label%, %A_windir%\system32\%user%.ini, money%keynum%, Label
iniwrite, %amount%, %A_windir%\system32\%user%.ini, money%keynum%, amount
iniwrite, %Date%, %A_windir%\system32\%user%.ini, money%keynum%, added
iniwrite, Withdrawal, %A_windir%\system32\%user%.ini, money%keynum%, type
LV_Delete()
gosub, readini
gosub, gatherinfo
Guicontrol, , newtotal, %newtotal%
}
Return
3guiclose:
gui, 3:destroy
Return
4GuiClose:
gui, 4:destroy
Return
exit:
GuiClose:
2GuiClose:
ExitApp
~enter::
ifwinactive, Sign in
gosub, go