Jump to content
Sign in to follow this  
Damein

Personal Budgeter

Recommended Posts

Damein

Here's a little program I made to help myself keep track of expenses and things a like (Could of named it Checkbook I suppose, but meh)

Source Forge

The source for it is in the downloads section under Source.

The codes a little sloppy, I could of saved time by using For loops, I'll clean it up eventually but it works well :)

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Images\IconImage.ico
#AutoIt3Wrapper_Compression=0
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=R.S.S.
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include
#include
#include
#include
#include
#include
#include
#include ".\Skins\Xport2.au3"

#include "_UskinLibrary.au3"

_Uskin_LoadDLL()
_USkin_Init(_Xport2(True))

Opt("GUIOnEventMode", 1)

Dim $Week1Expense[1000][1000], $Week1ExpenseCost[1000][1000]
Dim $Week2Expense[1000][1000], $Week2ExpenseCost[1000][1000]
Dim $Week3Expense[1000][1000], $Week3ExpenseCost[1000][1000]
Dim $Week4Expense[1000][1000], $Week4ExpenseCost[1000][1000]
Dim $MonthlyExpense[1000][1000], $MonthlyExpenseCost[1000][1000]
Dim $MonthlyExpenseDueDate[1000][1000], $MonthlyExpenseDueDateData[1000], $MonthlyDueDates[1000], $MonthlyExpenseData[1000]

Global $Change = 0

$HotKey = IniRead("Budget Expense Data.ini","Hotkey","Hotkey","NotFound")
If $HotKey = "NotFound" Then
MsgBox(0, "First Run", "Hello and welcome to the Personal Budgeter Program. As a first time user we must set the hotkey you would like to use to access the program. In the next window please select a key to use. The F11 key is a good choice for its ease of access and the fact it isn't used in everyday use.")
$NewHotKey = InputBox("New Hotkey", "Please choose your HotKey here. For a function key like F11 please input it like the folllowing: {F11}.")

Else
$NewHotKey = $HotKey
EndIf
While $NewHotKey = ""
If $NewHotKey = "" Then
$NewHotKey = InputBox("New Hotkey", "Please choose your HotKey here. For a function key like F11 please input it like the folllowing: {F11}.")
EndIf
WEnd

HotKeySet($NewHotKey, "_ShowGui")

IniWrite("Budget Expense Data.ini", "Hotkey", "Hotkey", $NewHotKey)

$BudgetGUI = GuiCreate("Personal Budgeter", 600,500)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GuiCtrlCreateLabel("An R.S.S. production",500,490)
GuiCtrlSetFont(-1, 7,400,2)

$ContextMenu = GuiCtrlCreateContextMenu()
$MinimizeGUI = GUICtrlCreateMenuItem("Hide Budgeter...", $ContextMenu)
GUICtrlSetOnEvent(-1, "_HideIt")
$CloseGUI = GUICtrlCreateMenuItem("Close Budgeter...", $ContextMenu)
GUICtrlSetOnEvent(-1, "_Exit")
$ChangeHotKey = GUICtrlCreateMenuItem("Change Hotkey...", $ContextMenu)
GUICtrlSetOnEvent(-1, "_ChangeHotKey")

GuiCtrlCreateTab(10,20,575,465)


GuiCtrlCreateTabItem("Week 1")

$Week1Data = IniReadSection("Budget Expense Data.ini", "Week1")
If @error Then
MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
For $i = 1 To $Week1Data[0][0] - 1
$DataSplit = StringSplit($Week1Data[$i][1],"|")
$Week1Expense[$i][1] = $DataSplit[1]
$Week1ExpenseCost[$i][1] = $DataSplit[2]
Next
EndIf

GuiCtrlCreateLabel("Expense 1:", 25,60)
$Week1Expense1 = GuiCtrlCreateEdit($Week1Expense[1][1], 80, 59, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 1 Cost:", 25,85)
$Week1Expense1Cost = GuiCtrlCreateEdit($Week1ExpenseCost[1][1], 103, 83, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,98)

GuiCtrlCreateLabel("Expense 2:", 25,120)
$Week1Expense2 = GuiCtrlCreateEdit($Week1Expense[2][1], 80, 119, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 2 Cost:", 25, 145)
$Week1Expense2Cost = GuiCtrlCreateEdit($Week1ExpenseCost[2][1], 103, 143, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,158)

GuiCtrlCreateLabel("Expense 3:", 25,180)
$Week1Expense3 = GuiCtrlCreateEdit($Week1Expense[3][1], 80, 179, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 3 Cost:", 25, 205)
$Week1Expense3Cost = GuiCtrlCreateEdit($Week1ExpenseCost[3][1], 103, 203, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,218)

GuiCtrlCreateLabel("Expense 4:", 25,240)
$Week1Expense4 = GuiCtrlCreateEdit($Week1Expense[4][1], 80, 239, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 4 Cost:", 25, 265)
$Week1Expense4Cost = GuiCtrlCreateEdit($Week1ExpenseCost[4][1], 103, 263, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,278)

GuiCtrlCreateLabel("Expense 5:", 25,300)
$Week1Expense5 = GuiCtrlCreateEdit($Week1Expense[5][1], 80, 299, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 5 Cost:", 25, 325)
$Week1Expense5Cost = GuiCtrlCreateEdit($Week1ExpenseCost[5][1], 103, 324, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,338)

GuiCtrlCreateLabel("Expense 6:", 25,360)
$Week1Expense6 = GuiCtrlCreateEdit($Week1Expense[6][1], 80, 359, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 6 Cost:", 25, 385)
$Week1Expense6Cost = GuiCtrlCreateEdit($Week1ExpenseCost[6][1], 103, 384, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,398)

GuiCtrlCreateLabel("Expense 7:", 360,60)
$Week1Expense7 = GuiCtrlCreateEdit($Week1Expense[7][1], 415, 59, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 7 Cost:", 360,85)
$Week1Expense7Cost = GuiCtrlCreateEdit($Week1ExpenseCost[7][1], 438, 83, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 8:", 360,120)
$Week1Expense8 = GuiCtrlCreateEdit($Week1Expense[8][1], 415, 119, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 8 Cost:", 360,145)
$Week1Expense8Cost = GuiCtrlCreateEdit($Week1ExpenseCost[8][1], 438, 144, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 9:", 360,180)
$Week1Expense9 = GuiCtrlCreateEdit($Week1Expense[9][1], 415, 179, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 9 Cost:", 360,205)
$Week1Expense9Cost = GuiCtrlCreateEdit($Week1ExpenseCost[9][1], 438, 204, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 10:", 360,240)
$Week1Expense10 = GuiCtrlCreateEdit($Week1Expense[10][1], 420, 239, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 10 Cost:", 360,265)
$Week1Expense10Cost = GuiCtrlCreateEdit($Week1ExpenseCost[10][1], 444, 264, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 11:", 360,300)
$Week1Expense11 = GuiCtrlCreateEdit($Week1Expense[11][1], 420, 299, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 11 Cost:", 360,325)
$Week1Expense11Cost = GuiCtrlCreateEdit($Week1ExpenseCost[11][1], 444, 324, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 12:", 360,360)
$Week1Expense12 = GuiCtrlCreateEdit($Week1Expense[12][1], 420, 359, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 12 Cost:", 360,385)
$Week1Expense12Cost = GuiCtrlCreateEdit($Week1ExpenseCost[12][1], 444, 384, 100,18, $ES_NUMBER)

$Week1ExpenseSubmitButton = GuiCtrlCreateButton("Calculate && Submit", 245,420)
GUICtrlSetOnEvent($Week1ExpenseSubmitButton, "_CalculateAndSubmitWeek1")
$Week1ExpenseTotal = GuiCtrlCreateEdit("$ 0", 245, 450,102,20, BitOr($ES_READONLY, $ES_CENTER))

$CalculatorButton = GuiCtrlCreateButton("", 510,420,40,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\CalculatorImage.bmp")
GUICtrlSetOnEvent($CalculatorButton, "_OpenCalc")

$NotepadButton = GuiCtrlCreateButton("", 40, 420,50,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\NotepadImage.bmp")
GUICtrlSetOnEvent($NotepadButton, "_OpenNotepad")

_CalculateAndSubmitWeek1()

GuiCtrlCreateTabItem("Week 2")

$Week2Data = IniReadSection("Budget Expense Data.ini", "Week2")
If @error Then
MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
For $i = 1 To $Week2Data[0][0] - 1
$DataSplit = StringSplit($Week2Data[$i][1],"|")
$Week2Expense[$i][1] = $DataSplit[1]
$Week2ExpenseCost[$i][1] = $DataSplit[2]
Next
EndIf

GuiCtrlCreateLabel("Expense 1:", 25,60)
$Week2Expense1 = GuiCtrlCreateEdit($Week2Expense[1][1], 80, 59, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 1 Cost:", 25,85)
$Week2Expense1Cost = GuiCtrlCreateEdit($Week2ExpenseCost[1][1], 103, 83, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,98)

GuiCtrlCreateLabel("Expense 2:", 25,120)
$Week2Expense2 = GuiCtrlCreateEdit($Week2Expense[2][1], 80, 119, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 2 Cost:", 25, 145)
$Week2Expense2Cost = GuiCtrlCreateEdit($Week2ExpenseCost[2][1], 103, 143, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,158)

GuiCtrlCreateLabel("Expense 3:", 25,180)
$Week2Expense3 = GuiCtrlCreateEdit($Week2Expense[3][1], 80, 179, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 3 Cost:", 25, 205)
$Week2Expense3Cost = GuiCtrlCreateEdit($Week2ExpenseCost[3][1], 103, 203, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,218)

GuiCtrlCreateLabel("Expense 4:", 25,240)
$Week2Expense4 = GuiCtrlCreateEdit($Week2Expense[4][1], 80, 239, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 4 Cost:", 25, 265)
$Week2Expense4Cost = GuiCtrlCreateEdit($Week2ExpenseCost[4][1], 103, 263, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,278)

GuiCtrlCreateLabel("Expense 5:", 25,300)
$Week2Expense5 = GuiCtrlCreateEdit($Week2Expense[5][1], 80, 299, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 5 Cost:", 25, 325)
$Week2Expense5Cost = GuiCtrlCreateEdit($Week2ExpenseCost[5][1], 103, 324, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,338)

GuiCtrlCreateLabel("Expense 6:", 25,360)
$Week2Expense6 = GuiCtrlCreateEdit($Week2Expense[6][1], 80, 359, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 6 Cost:", 25, 385)
$Week2Expense6Cost = GuiCtrlCreateEdit($Week2ExpenseCost[6][1], 103, 384, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,398)

GuiCtrlCreateLabel("Expense 7:", 360,60)
$Week2Expense7 = GuiCtrlCreateEdit($Week2Expense[7][1], 415, 59, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 7 Cost:", 360,85)
$Week2Expense7Cost = GuiCtrlCreateEdit($Week2ExpenseCost[7][1], 438, 83, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 8:", 360,120)
$Week2Expense8 = GuiCtrlCreateEdit($Week2Expense[8][1], 415, 119, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 8 Cost:", 360,145)
$Week2Expense8Cost = GuiCtrlCreateEdit($Week2ExpenseCost[8][1], 438, 144, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 9:", 360,180)
$Week2Expense9 = GuiCtrlCreateEdit($Week2Expense[9][1], 415, 179, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 9 Cost:", 360,205)
$Week2Expense9Cost = GuiCtrlCreateEdit($Week2ExpenseCost[9][1], 438, 204, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 10:", 360,240)
$Week2Expense10 = GuiCtrlCreateEdit($Week2Expense[10][1], 420, 239, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 10 Cost:", 360,265)
$Week2Expense10Cost = GuiCtrlCreateEdit($Week2ExpenseCost[10][1], 444, 264, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 11:", 360,300)
$Week2Expense11 = GuiCtrlCreateEdit($Week2Expense[11][1], 420, 299, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 11 Cost:", 360,325)
$Week2Expense11Cost = GuiCtrlCreateEdit($Week2ExpenseCost[11][1], 444, 324, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 12:", 360,360)
$Week2Expense12 = GuiCtrlCreateEdit($Week2Expense[12][1], 420, 359, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 12 Cost:", 360,385)
$Week2Expense12Cost = GuiCtrlCreateEdit($Week2ExpenseCost[12][1], 444, 384, 100,18, $ES_NUMBER)

$Week2ExpenseSubmitButton = GuiCtrlCreateButton("Calculate && Submit", 245,420)
GUICtrlSetOnEvent($Week2ExpenseSubmitButton, "_CalculateAndSubmitWeek2")
$Week2ExpenseTotal = GuiCtrlCreateEdit("$ 0", 245, 450,102,20, BitOr($ES_READONLY, $ES_CENTER))

$CalculatorButton = GuiCtrlCreateButton("", 510,420,40,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\CalculatorImage.bmp")
GUICtrlSetOnEvent($CalculatorButton, "_OpenCalc")

$NotepadButton = GuiCtrlCreateButton("", 40, 420,50,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\NotepadImage.bmp")
GUICtrlSetOnEvent($NotepadButton, "_OpenNotepad")

_CalculateAndSubmitWeek2()

GuiCtrlCreateTabItem("Week 3")

$Week3Data = IniReadSection("Budget Expense Data.ini", "Week3")
If @error Then
MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
For $i = 1 To $Week3Data[0][0] - 1
$DataSplit = StringSplit($Week3Data[$i][1],"|")
$Week3Expense[$i][1] = $DataSplit[1]
$Week3ExpenseCost[$i][1] = $DataSplit[2]
Next
EndIf

GuiCtrlCreateLabel("Expense 1:", 25,60)
$Week3Expense1 = GuiCtrlCreateEdit($Week3Expense[1][1], 80, 59, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 1 Cost:", 25,85)
$Week3Expense1Cost = GuiCtrlCreateEdit($Week3ExpenseCost[1][1], 103, 83, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,98)

GuiCtrlCreateLabel("Expense 2:", 25,120)
$Week3Expense2 = GuiCtrlCreateEdit($Week3Expense[2][1], 80, 119, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 2 Cost:", 25, 145)
$Week3Expense2Cost = GuiCtrlCreateEdit($Week3ExpenseCost[2][1], 103, 143, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,158)

GuiCtrlCreateLabel("Expense 3:", 25,180)
$Week3Expense3 = GuiCtrlCreateEdit($Week3Expense[3][1], 80, 179, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 3 Cost:", 25, 205)
$Week3Expense3Cost = GuiCtrlCreateEdit($Week3ExpenseCost[3][1], 103, 203, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,218)

GuiCtrlCreateLabel("Expense 4:", 25,240)
$Week3Expense4 = GuiCtrlCreateEdit($Week3Expense[4][1], 80, 239, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 4 Cost:", 25, 265)
$Week3Expense4Cost = GuiCtrlCreateEdit($Week3ExpenseCost[4][1], 103, 263, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,278)

GuiCtrlCreateLabel("Expense 5:", 25,300)
$Week3Expense5 = GuiCtrlCreateEdit($Week3Expense[5][1], 80, 299, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 5 Cost:", 25, 325)
$Week3Expense5Cost = GuiCtrlCreateEdit($Week3ExpenseCost[5][1], 103, 324, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,338)

GuiCtrlCreateLabel("Expense 6:", 25,360)
$Week3Expense6 = GuiCtrlCreateEdit($Week3Expense[6][1], 80, 359, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 6 Cost:", 25, 385)
$Week3Expense6Cost = GuiCtrlCreateEdit($Week3ExpenseCost[6][1], 103, 384, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,398)

GuiCtrlCreateLabel("Expense 7:", 360,60)
$Week3Expense7 = GuiCtrlCreateEdit($Week3Expense[7][1], 415, 59, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 7 Cost:", 360,85)
$Week3Expense7Cost = GuiCtrlCreateEdit($Week3ExpenseCost[7][1], 438, 83, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 8:", 360,120)
$Week3Expense8 = GuiCtrlCreateEdit($Week3Expense[8][1], 415, 119, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 8 Cost:", 360,145)
$Week3Expense8Cost = GuiCtrlCreateEdit($Week3ExpenseCost[8][1], 438, 144, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 9:", 360,180)
$Week3Expense9 = GuiCtrlCreateEdit($Week3Expense[9][1], 415, 179, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 9 Cost:", 360,205)
$Week3Expense9Cost = GuiCtrlCreateEdit($Week3ExpenseCost[9][1], 438, 204, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 10:", 360,240)
$Week3Expense10 = GuiCtrlCreateEdit($Week3Expense[10][1], 420, 239, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 10 Cost:", 360,265)
$Week3Expense10Cost = GuiCtrlCreateEdit($Week3ExpenseCost[10][1], 444, 264, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 11:", 360,300)
$Week3Expense11 = GuiCtrlCreateEdit($Week3Expense[11][1], 420, 299, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 11 Cost:", 360,325)
$Week3Expense11Cost = GuiCtrlCreateEdit($Week3ExpenseCost[11][1], 444, 324, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 12:", 360,360)
$Week3Expense12 = GuiCtrlCreateEdit($Week3Expense[12][1], 420, 359, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 12 Cost:", 360,385)
$Week3Expense12Cost = GuiCtrlCreateEdit($Week3ExpenseCost[12][1], 444, 384, 100,18, $ES_NUMBER)

$Week3ExpenseSubmitButton = GuiCtrlCreateButton("Calculate && Submit", 245,420)
GUICtrlSetOnEvent($Week3ExpenseSubmitButton, "_CalculateAndSubmitWeek3")
$Week3ExpenseTotal = GuiCtrlCreateEdit("$ 0", 245, 450,102,20, BitOr($ES_READONLY, $ES_CENTER))

$CalculatorButton = GuiCtrlCreateButton("", 510,420,40,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\CalculatorImage.bmp")
GUICtrlSetOnEvent($CalculatorButton, "_OpenCalc")

$NotepadButton = GuiCtrlCreateButton("", 40, 420,50,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\NotepadImage.bmp")
GUICtrlSetOnEvent($NotepadButton, "_OpenNotepad")

_CalculateAndSubmitWeek3()

GuiCtrlCreateTabItem("Week 4")

$Week4Data = IniReadSection("Budget Expense Data.ini", "Week4")
If @error Then
MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
For $i = 1 To $Week4Data[0][0] - 1
$DataSplit = StringSplit($Week4Data[$i][1],"|")
$Week4Expense[$i][1] = $DataSplit[1]
$Week4ExpenseCost[$i][1] = $DataSplit[2]
Next
EndIf

GuiCtrlCreateLabel("Expense 1:", 25,60)
$Week4Expense1 = GuiCtrlCreateEdit($Week4Expense[1][1], 80, 59, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 1 Cost:", 25,85)
$Week4Expense1Cost = GuiCtrlCreateEdit($Week4ExpenseCost[1][1], 103, 83, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,98)

GuiCtrlCreateLabel("Expense 2:", 25,120)
$Week4Expense2 = GuiCtrlCreateEdit($Week4Expense[2][1], 80, 119, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 2 Cost:", 25, 145)
$Week4Expense2Cost = GuiCtrlCreateEdit($Week4ExpenseCost[2][1], 103, 143, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,158)

GuiCtrlCreateLabel("Expense 3:", 25,180)
$Week4Expense3 = GuiCtrlCreateEdit($Week4Expense[3][1], 80, 179, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 3 Cost:", 25, 205)
$Week4Expense3Cost = GuiCtrlCreateEdit($Week4ExpenseCost[3][1], 103, 203, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,218)

GuiCtrlCreateLabel("Expense 4:", 25,240)
$Week4Expense4 = GuiCtrlCreateEdit($Week4Expense[4][1], 80, 239, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 4 Cost:", 25, 265)
$Week4Expense4Cost = GuiCtrlCreateEdit($Week4ExpenseCost[4][1], 103, 263, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,278)

GuiCtrlCreateLabel("Expense 5:", 25,300)
$Week4Expense5 = GuiCtrlCreateEdit($Week4Expense[5][1], 80, 299, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 5 Cost:", 25, 325)
$Week4Expense5Cost = GuiCtrlCreateEdit($Week4ExpenseCost[5][1], 103, 324, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,338)

GuiCtrlCreateLabel("Expense 6:", 25,360)
$Week4Expense6 = GuiCtrlCreateEdit($Week4Expense[6][1], 80, 359, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 6 Cost:", 25, 385)
$Week4Expense6Cost = GuiCtrlCreateEdit($Week4ExpenseCost[6][1], 103, 384, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,398)

GuiCtrlCreateLabel("Expense 7:", 360,60)
$Week4Expense7 = GuiCtrlCreateEdit($Week4Expense[7][1], 415, 59, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 7 Cost:", 360,85)
$Week4Expense7Cost = GuiCtrlCreateEdit($Week4ExpenseCost[7][1], 438, 83, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 8:", 360,120)
$Week4Expense8 = GuiCtrlCreateEdit($Week4Expense[8][1], 415, 119, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 8 Cost:", 360,145)
$Week4Expense8Cost = GuiCtrlCreateEdit($Week4ExpenseCost[8][1], 438, 144, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 9:", 360,180)
$Week4Expense9 = GuiCtrlCreateEdit($Week4Expense[9][1], 415, 179, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 9 Cost:", 360,205)
$Week4Expense9Cost = GuiCtrlCreateEdit($Week4ExpenseCost[9][1], 438, 204, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 10:", 360,240)
$Week4Expense10 = GuiCtrlCreateEdit($Week4Expense[10][1], 420, 239, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 10 Cost:", 360,265)
$Week4Expense10Cost = GuiCtrlCreateEdit($Week4ExpenseCost[10][1], 444, 264, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 11:", 360,300)
$Week4Expense11 = GuiCtrlCreateEdit($Week4Expense[11][1], 420, 299, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 11 Cost:", 360,325)
$Week4Expense11Cost = GuiCtrlCreateEdit($Week4ExpenseCost[11][1], 444, 324, 100,18, $ES_NUMBER)

GuiCtrlCreateLabel("Expense 12:", 360,360)
$Week4Expense12 = GuiCtrlCreateEdit($Week4Expense[12][1], 420, 359, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 12 Cost:", 360,385)
$Week4Expense12Cost = GuiCtrlCreateEdit($Week4ExpenseCost[12][1], 444, 384, 100,18, $ES_NUMBER)

$Week4ExpenseSubmitButton = GuiCtrlCreateButton("Calculate && Submit", 245,420)
GUICtrlSetOnEvent($Week4ExpenseSubmitButton, "_CalculateAndSubmitWeek4")
$Week4ExpenseTotal = GuiCtrlCreateEdit("$ 0", 245, 450,102,20, BitOr($ES_READONLY, $ES_CENTER))

$CalculatorButton = GuiCtrlCreateButton("", 510,420,40,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\CalculatorImage.bmp")
GUICtrlSetOnEvent($CalculatorButton, "_OpenCalc")

$NotepadButton = GuiCtrlCreateButton("", 40, 420,50,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\NotepadImage.bmp")
GUICtrlSetOnEvent($NotepadButton, "_OpenNotepad")

_CalculateAndSubmitWeek4()

GuiCtrlCreateTabItem("Monthly")

$MonthlyData = IniReadSection("Budget Expense Data.ini", "Monthly")
If @error Then
MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
For $i = 1 To $MonthlyData[0][0] - 1
$DataSplit = StringSplit($MonthlyData[$i][1],"|")
$MonthlyExpense[$i][1] = $DataSplit[1]
$MonthlyExpenseCost[$i][1] = $DataSplit[2]
Next
EndIf

$MonthlyDueDates = IniReadSection("Budget Expense Data.ini", "Monthly Due Dates")
If @error Then
MsgBox(4096, "Error", "Error!")
Else
For $i = 1 To $MonthlyDueDates[0][0]
$SplitDates = StringSplit($MonthlyDueDates[$i][1], "/")
If StringLen($SplitDates[2]) < 2 Then
$MonthlyExpenseDueDate[$i][1] = $SplitDates[3] & "/" & "0" & $SplitDates[1] & "/" & "0" & $SplitDates[2]
Else
$MonthlyExpenseDueDate[$i][1] = $SplitDates[3] & "/" & "0" & $SplitDates[1] & "/" & $SplitDates[2]
EndIf
Next
EndIf

GuiCtrlCreateLabel("Expense 1:", 25,45)
$MonthlyExpense1 = GuiCtrlCreateEdit($MonthlyExpense[1][1], 80, 44, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 1 Cost:", 25,69)
$MonthlyExpense1Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[1][1], 103, 68, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",25,90)
$MonthlyExpense1DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[1][1], 76, 89, 100, 15, $DTS_SHORTDATEFORMAT)


GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,98)

GuiCtrlCreateLabel("Expense 2:", 25,115)
$MonthlyExpense2 = GuiCtrlCreateEdit($MonthlyExpense[2][1], 80, 114, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 2 Cost:", 25,135)
$MonthlyExpense2Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[2][1], 103, 134, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",25,155)
$MonthlyExpense2DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[2][1], 76, 154, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,158)

GuiCtrlCreateLabel("Expense 3:", 25,175)
$MonthlyExpense3 = GuiCtrlCreateEdit($MonthlyExpense[3][1], 80, 174, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 3 Cost:", 25,195)
$MonthlyExpense3Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[3][1], 103, 194, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",25,215)
$MonthlyExpense3DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[3][1], 76, 214, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,218)

GuiCtrlCreateLabel("Expense 4:", 25,235)
$MonthlyExpense4 = GuiCtrlCreateEdit($MonthlyExpense[4][1], 80, 234, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 4 Cost:", 25,255)
$MonthlyExpense4Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[4][1], 103, 254, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",25,275)
$MonthlyExpense4DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[4][1], 76, 274, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,278)

GuiCtrlCreateLabel("Expense 5:", 25,295)
$MonthlyExpense5 = GuiCtrlCreateEdit($MonthlyExpense[5][1], 80, 294, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 5 Cost:", 25,315)
$MonthlyExpense5Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[5][1], 103, 314, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",25,335)
$MonthlyExpense5DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[5][1], 76, 334, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,338)

GuiCtrlCreateLabel("Expense 6:", 25,355)
$MonthlyExpense6 = GuiCtrlCreateEdit($MonthlyExpense[6][1], 80, 354, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 6 Cost:", 25,375)
$MonthlyExpense6Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[6][1], 103, 374, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",25,395)
$MonthlyExpense6DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[6][1], 76, 394, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("_______________________________________________________________________________________________",11,398)

GuiCtrlCreateLabel("Expense 7:", 360,45)
$MonthlyExpense7 = GuiCtrlCreateEdit($MonthlyExpense[7][1], 415, 44, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 7 Cost:", 360,69)
$MonthlyExpense7Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[7][1], 438, 68, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",360,90)
$MonthlyExpense7DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[7][1], 411, 89, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("Expense 8:", 360,115)
$MonthlyExpense8 = GuiCtrlCreateEdit($MonthlyExpense[8][1], 415, 114, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 8 Cost:", 360,135)
$MonthlyExpense8Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[8][1], 438, 134, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",360,155)
$MonthlyExpense8DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[8][1], 411, 154, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("Expense 9:", 360,175)
$MonthlyExpense9 = GuiCtrlCreateEdit($MonthlyExpense[9][1], 415, 174, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 9 Cost:", 360,195)
$MonthlyExpense9Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[9][1], 438, 194, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",360,215)
$MonthlyExpense9DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[9][1], 411, 214, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("Expense 10:", 360,235)
$MonthlyExpense10 = GuiCtrlCreateEdit($MonthlyExpense[10][1], 420, 234, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 10 Cost:", 360,255)
$MonthlyExpense10Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[10][1], 444, 254, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",360,275)
$MonthlyExpense10DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[10][1], 411, 274, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("Expense 11:", 360,295)
$MonthlyExpense11 = GuiCtrlCreateEdit($MonthlyExpense[11][1], 420, 294, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 11 Cost:", 360,315)
$MonthlyExpense11Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[11][1], 444, 314, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",360,335)
$MonthlyExpense11DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[11][1], 411, 334, 100, 15, $DTS_SHORTDATEFORMAT)

GuiCtrlCreateLabel("Expense 12:", 360,355)
$MonthlyExpense12 = GuiCtrlCreateEdit($MonthlyExpense[12][1], 420, 354, 100,18, BitOr($ES_MULTILINE, $ES_AUTOVSCROLL))
GuiCtrlCreateLabel("Expense 12 Cost:", 360,375)
$MonthlyExpense12Cost = GuiCtrlCreateEdit($MonthlyExpenseCost[12][1], 444, 374, 100,18, $ES_NUMBER)
GuiCtrlCreateLabel("Due Date:",360,395)
$MonthlyExpense12DueDate = GUICtrlCreateDate($MonthlyExpenseDueDate[12][1], 411, 394, 100, 15, $DTS_SHORTDATEFORMAT)

$MonthlyExpenseSubmitButton = GuiCtrlCreateButton("Calculate && Submit", 245,420)
GUICtrlSetOnEvent($MonthlyExpenseSubmitButton, "_CalculateAndSubmitMonthly")
$MonthlyExpenseTotal = GuiCtrlCreateEdit("$ 0", 245, 450,102,20, BitOr($ES_READONLY, $ES_CENTER))

$CalculatorButton = GuiCtrlCreateButton("", 510,420,40,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\CalculatorImage.bmp")
GUICtrlSetOnEvent($CalculatorButton, "_OpenCalc")

$NotepadButton = GuiCtrlCreateButton("", 40, 420,50,50, $BS_BITMAP)
GuiCtrlSetImage(-1, @ScriptDir & "\Images\NotepadImage.bmp")
GUICtrlSetOnEvent($NotepadButton, "_OpenNotepad")

GuiSetState()

_CalculateAndSubmitMonthly()

AdlibRegister("_CheckDueDates", 3600000)

Func _CalculateAndSubmitWeek1()
$Week1Expense1Data = GuiCtrlRead($Week1Expense1)
$Week1Expense2Data = GuiCtrlRead($Week1Expense2)
$Week1Expense3Data = GuiCtrlRead($Week1Expense3)
$Week1Expense4Data = GuiCtrlRead($Week1Expense4)
$Week1Expense5Data = GuiCtrlRead($Week1Expense5)
$Week1Expense6Data = GuiCtrlRead($Week1Expense6)
$Week1Expense7Data = GuiCtrlRead($Week1Expense7)
$Week1Expense8Data = GuiCtrlRead($Week1Expense8)
$Week1Expense9Data = GuiCtrlRead($Week1Expense9)
$Week1Expense10Data = GuiCtrlRead($Week1Expense10)
$Week1Expense11Data = GuiCtrlRead($Week1Expense11)
$Week1Expense12Data = GuiCtrlRead($Week1Expense12)
$Week1Expense1CostData = GuiCtrlRead($Week1Expense1Cost)
$Week1Expense2CostData = GuiCtrlRead($Week1Expense2Cost)
$Week1Expense3CostData = GuiCtrlRead($Week1Expense3Cost)
$Week1Expense4CostData = GuiCtrlRead($Week1Expense4Cost)
$Week1Expense5CostData = GuiCtrlRead($Week1Expense5Cost)
$Week1Expense6CostData = GuiCtrlRead($Week1Expense6Cost)
$Week1Expense7CostData = GuiCtrlRead($Week1Expense7Cost)
$Week1Expense8CostData = GuiCtrlRead($Week1Expense8Cost)
$Week1Expense9CostData = GuiCtrlRead($Week1Expense9Cost)
$Week1Expense10CostData = GuiCtrlRead($Week1Expense10Cost)
$Week1Expense11CostData = GuiCtrlRead($Week1Expense11Cost)
$Week1Expense12CostData = GuiCtrlRead($Week1Expense12Cost)

$Week1ExpensesTotal = $Week1Expense1CostData + $Week1Expense2CostData + $Week1Expense3CostData + $Week1Expense4CostData + $Week1Expense5CostData + _
$Week1Expense6CostData + $Week1Expense7CostData + $Week1Expense8CostData + $Week1Expense9CostData + $Week1Expense10CostData + $Week1Expense11CostData + _
$Week1Expense12CostData

If StringLen($Week1ExpensesTotal) = 4 Then
$SplitForThousands = StringSplit($Week1ExpensesTotal, "")
$Week1ExpensesTotal = $SplitForThousands[1] & "," & $SplitForThousands[2] & $SplitForThousands[3] & $SplitForThousands[4]
ElseIf StringLen($Week1ExpensesTotal) = 5 Then
$SplitForTenThousands = StringSplit($Week1ExpensesTotal, "")
$Week1ExpensesTotal = $SplitForTenThousands[1] & $SplitForTenThousands[2] & "," & $SplitForTenThousands[3] & $SplitForTenThousands[4] & $SplitForTenThousands[5]
EndIf

GuiCtrlSetData($Week1ExpenseTotal, "$ " & $Week1ExpensesTotal)

IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense1", $Week1Expense1Data & "|" & $Week1Expense1CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense2", $Week1Expense2Data & "|" & $Week1Expense2CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense3", $Week1Expense3Data & "|" & $Week1Expense3CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense4", $Week1Expense4Data & "|" & $Week1Expense4CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense5", $Week1Expense5Data & "|" & $Week1Expense5CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense6", $Week1Expense6Data & "|" & $Week1Expense6CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense7", $Week1Expense7Data & "|" & $Week1Expense7CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense8", $Week1Expense8Data & "|" & $Week1Expense8CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense9", $Week1Expense9Data & "|" & $Week1Expense9CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense10", $Week1Expense10Data & "|" & $Week1Expense10CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense11", $Week1Expense11Data & "|" & $Week1Expense11CostData)
IniWrite("Budget Expense Data.ini", "Week1", "Week1Expense12", $Week1Expense12Data & "|" & $Week1Expense12CostData)

IniWrite("Budget Expense Data.ini", "Week1", "Total", $Week1ExpensesTotal)

EndFunc

Func _CalculateAndSubmitWeek2()
$Week2Expense1Data = GuiCtrlRead($Week2Expense1)
$Week2Expense2Data = GuiCtrlRead($Week2Expense2)
$Week2Expense3Data = GuiCtrlRead($Week2Expense3)
$Week2Expense4Data = GuiCtrlRead($Week2Expense4)
$Week2Expense5Data = GuiCtrlRead($Week2Expense5)
$Week2Expense6Data = GuiCtrlRead($Week2Expense6)
$Week2Expense7Data = GuiCtrlRead($Week2Expense7)
$Week2Expense8Data = GuiCtrlRead($Week2Expense8)
$Week2Expense9Data = GuiCtrlRead($Week2Expense9)
$Week2Expense10Data = GuiCtrlRead($Week2Expense10)
$Week2Expense11Data = GuiCtrlRead($Week2Expense11)
$Week2Expense12Data = GuiCtrlRead($Week2Expense12)
$Week2Expense1CostData = GuiCtrlRead($Week2Expense1Cost)
$Week2Expense2CostData = GuiCtrlRead($Week2Expense2Cost)
$Week2Expense3CostData = GuiCtrlRead($Week2Expense3Cost)
$Week2Expense4CostData = GuiCtrlRead($Week2Expense4Cost)
$Week2Expense5CostData = GuiCtrlRead($Week2Expense5Cost)
$Week2Expense6CostData = GuiCtrlRead($Week2Expense6Cost)
$Week2Expense7CostData = GuiCtrlRead($Week2Expense7Cost)
$Week2Expense8CostData = GuiCtrlRead($Week2Expense8Cost)
$Week2Expense9CostData = GuiCtrlRead($Week2Expense9Cost)
$Week2Expense10CostData = GuiCtrlRead($Week2Expense10Cost)
$Week2Expense11CostData = GuiCtrlRead($Week2Expense11Cost)
$Week2Expense12CostData = GuiCtrlRead($Week2Expense12Cost)

$Week2ExpensesTotal = $Week2Expense1CostData + $Week2Expense2CostData + $Week2Expense3CostData + $Week2Expense4CostData + $Week2Expense5CostData + _
$Week2Expense6CostData + $Week2Expense7CostData + $Week2Expense8CostData + $Week2Expense9CostData + $Week2Expense10CostData + $Week2Expense11CostData + _
$Week2Expense12CostData

If StringLen($Week2ExpensesTotal) = 4 Then
$SplitForThousands = StringSplit($Week2ExpensesTotal, "")
$Week2ExpensesTotal = $SplitForThousands[1] & "," & $SplitForThousands[2] & $SplitForThousands[3] & $SplitForThousands[4]
ElseIf StringLen($Week2ExpensesTotal) = 5 Then
$SplitForTenThousands = StringSplit($Week2ExpensesTotal, "")
$Week2ExpensesTotal = $SplitForTenThousands[1] & $SplitForTenThousands[2] & "," & $SplitForTenThousands[3] & $SplitForTenThousands[4] & $SplitForTenThousands[5]
EndIf

GuiCtrlSetData($Week2ExpenseTotal, "$ " & $Week2ExpensesTotal)

IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense1", $Week2Expense1Data & "|" & $Week2Expense1CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense2", $Week2Expense2Data & "|" & $Week2Expense2CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense3", $Week2Expense2Data & "|" & $Week2Expense3CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense4", $Week2Expense4Data & "|" & $Week2Expense4CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense5", $Week2Expense5Data & "|" & $Week2Expense5CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense6", $Week2Expense6Data & "|" & $Week2Expense6CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense7", $Week2Expense7Data & "|" & $Week2Expense7CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense8", $Week2Expense8Data & "|" & $Week2Expense8CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense9", $Week2Expense9Data & "|" & $Week2Expense9CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense10", $Week2Expense10Data & "|" & $Week2Expense10CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense11", $Week2Expense11Data & "|" & $Week2Expense11CostData)
IniWrite("Budget Expense Data.ini", "Week2", "Week2Expense12", $Week2Expense12Data & "|" & $Week2Expense12CostData)

IniWrite("Budget Expense Data.ini", "Week2", "Total", $Week2ExpensesTotal)

EndFunc

Func _CalculateAndSubmitWeek3()
$Week3Expense1Data = GuiCtrlRead($Week3Expense1)
$Week3Expense2Data = GuiCtrlRead($Week3Expense2)
$Week3Expense3Data = GuiCtrlRead($Week3Expense3)
$Week3Expense4Data = GuiCtrlRead($Week3Expense4)
$Week3Expense5Data = GuiCtrlRead($Week3Expense5)
$Week3Expense6Data = GuiCtrlRead($Week3Expense6)
$Week3Expense7Data = GuiCtrlRead($Week3Expense7)
$Week3Expense8Data = GuiCtrlRead($Week3Expense8)
$Week3Expense9Data = GuiCtrlRead($Week3Expense9)
$Week3Expense10Data = GuiCtrlRead($Week3Expense10)
$Week3Expense11Data = GuiCtrlRead($Week3Expense11)
$Week3Expense12Data = GuiCtrlRead($Week3Expense12)
$Week3Expense1CostData = GuiCtrlRead($Week3Expense1Cost)
$Week3Expense2CostData = GuiCtrlRead($Week3Expense2Cost)
$Week3Expense3CostData = GuiCtrlRead($Week3Expense3Cost)
$Week3Expense4CostData = GuiCtrlRead($Week3Expense4Cost)
$Week3Expense5CostData = GuiCtrlRead($Week3Expense5Cost)
$Week3Expense6CostData = GuiCtrlRead($Week3Expense6Cost)
$Week3Expense7CostData = GuiCtrlRead($Week3Expense7Cost)
$Week3Expense8CostData = GuiCtrlRead($Week3Expense8Cost)
$Week3Expense9CostData = GuiCtrlRead($Week3Expense9Cost)
$Week3Expense10CostData = GuiCtrlRead($Week3Expense10Cost)
$Week3Expense11CostData = GuiCtrlRead($Week3Expense11Cost)
$Week3Expense12CostData = GuiCtrlRead($Week3Expense12Cost)

$Week3ExpensesTotal = $Week3Expense1CostData + $Week3Expense2CostData + $Week3Expense3CostData + $Week3Expense4CostData + $Week3Expense5CostData + _
$Week3Expense6CostData + $Week3Expense7CostData + $Week3Expense8CostData + $Week3Expense9CostData + $Week3Expense10CostData + $Week3Expense11CostData + _
$Week3Expense12CostData

If StringLen($Week3ExpensesTotal) = 4 Then
$SplitForThousands = StringSplit($Week3ExpensesTotal, "")
$Week3ExpensesTotal = $SplitForThousands[1] & "," & $SplitForThousands[2] & $SplitForThousands[3] & $SplitForThousands[4]
ElseIf StringLen($Week3ExpensesTotal) = 5 Then
$SplitForTenThousands = StringSplit($Week3ExpensesTotal, "")
$Week3ExpensesTotal = $SplitForTenThousands[1] & $SplitForTenThousands[2] & "," & $SplitForTenThousands[3] & $SplitForTenThousands[4] & $SplitForTenThousands[5]
EndIf

GuiCtrlSetData($Week3ExpenseTotal, "$ " & $Week3ExpensesTotal)

IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense1", $Week3Expense1Data & "|" & $Week3Expense1CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense2", $Week3Expense2Data & "|" & $Week3Expense2CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense3", $Week3Expense3Data & "|" & $Week3Expense3CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense4", $Week3Expense4Data & "|" & $Week3Expense4CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense5", $Week3Expense5Data & "|" & $Week3Expense5CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense6", $Week3Expense6Data & "|" & $Week3Expense6CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense7", $Week3Expense7Data & "|" & $Week3Expense7CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense8", $Week3Expense8Data & "|" & $Week3Expense8CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense9", $Week3Expense9Data & "|" & $Week3Expense9CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense10", $Week3Expense10Data & "|" & $Week3Expense10CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense11", $Week3Expense11Data & "|" & $Week3Expense11CostData)
IniWrite("Budget Expense Data.ini", "Week3", "Week3Expense12", $Week3Expense12Data & "|" & $Week3Expense12CostData)

IniWrite("Budget Expense Data.ini", "Week3", "Total", $Week3ExpensesTotal)

EndFunc

Func _CalculateAndSubmitWeek4()
$Week4Expense1Data = GuiCtrlRead($Week4Expense1)
$Week4Expense2Data = GuiCtrlRead($Week4Expense2)
$Week4Expense3Data = GuiCtrlRead($Week4Expense3)
$Week4Expense4Data = GuiCtrlRead($Week4Expense4)
$Week4Expense5Data = GuiCtrlRead($Week4Expense5)
$Week4Expense6Data = GuiCtrlRead($Week4Expense6)
$Week4Expense7Data = GuiCtrlRead($Week4Expense7)
$Week4Expense8Data = GuiCtrlRead($Week4Expense8)
$Week4Expense9Data = GuiCtrlRead($Week4Expense9)
$Week4Expense10Data = GuiCtrlRead($Week4Expense10)
$Week4Expense11Data = GuiCtrlRead($Week4Expense11)
$Week4Expense12Data = GuiCtrlRead($Week4Expense12)
$Week4Expense1CostData = GuiCtrlRead($Week4Expense1Cost)
$Week4Expense2CostData = GuiCtrlRead($Week4Expense2Cost)
$Week4Expense3CostData = GuiCtrlRead($Week4Expense3Cost)
$Week4Expense4CostData = GuiCtrlRead($Week4Expense4Cost)
$Week4Expense5CostData = GuiCtrlRead($Week4Expense5Cost)
$Week4Expense6CostData = GuiCtrlRead($Week4Expense6Cost)
$Week4Expense7CostData = GuiCtrlRead($Week4Expense7Cost)
$Week4Expense8CostData = GuiCtrlRead($Week4Expense8Cost)
$Week4Expense9CostData = GuiCtrlRead($Week4Expense9Cost)
$Week4Expense10CostData = GuiCtrlRead($Week4Expense10Cost)
$Week4Expense11CostData = GuiCtrlRead($Week4Expense11Cost)
$Week4Expense12CostData = GuiCtrlRead($Week4Expense12Cost)

$Week4ExpensesTotal = $Week4Expense1CostData + $Week4Expense2CostData + $Week4Expense3CostData + $Week4Expense4CostData + $Week4Expense5CostData + _
$Week4Expense6CostData + $Week4Expense7CostData + $Week4Expense8CostData + $Week4Expense9CostData + $Week4Expense10CostData + $Week4Expense11CostData + _
$Week4Expense12CostData

If StringLen($Week4ExpensesTotal) = 4 Then
$SplitForThousands = StringSplit($Week4ExpensesTotal, "")
$Week4ExpensesTotal = $SplitForThousands[1] & "," & $SplitForThousands[2] & $SplitForThousands[3] & $SplitForThousands[4]
ElseIf StringLen($Week4ExpensesTotal) = 5 Then
$SplitForTenThousands = StringSplit($Week4ExpensesTotal, "")
$Week4ExpensesTotal = $SplitForTenThousands[1] & $SplitForTenThousands[2] & "," & $SplitForTenThousands[3] & $SplitForTenThousands[4] & $SplitForTenThousands[5]
EndIf

GuiCtrlSetData($Week4ExpenseTotal, "$ " & $Week4ExpensesTotal)

IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense1", $Week4Expense1Data & "|" & $Week4Expense1CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense2", $Week4Expense2Data & "|" & $Week4Expense2CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense3", $Week4Expense3Data & "|" & $Week4Expense3CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense4", $Week4Expense4Data & "|" & $Week4Expense4CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense5", $Week4Expense5Data & "|" & $Week4Expense5CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense6", $Week4Expense6Data & "|" & $Week4Expense6CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense7", $Week4Expense7Data & "|" & $Week4Expense7CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense8", $Week4Expense8Data & "|" & $Week4Expense8CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense9", $Week4Expense9Data & "|" & $Week4Expense9CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense10", $Week4Expense10Data & "|" & $Week4Expense10CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense11", $Week4Expense11Data & "|" & $Week4Expense11CostData)
IniWrite("Budget Expense Data.ini", "Week4", "Week4Expense12", $Week4Expense12Data & "|" & $Week4Expense12CostData)

IniWrite("Budget Expense Data.ini", "Week4", "Total", $Week4ExpensesTotal)

EndFunc

Func _CalculateAndSubmitMonthly()
$MonthlyExpenseData[1] = GuiCtrlRead($MonthlyExpense1)
$MonthlyExpenseData[2] = GuiCtrlRead($MonthlyExpense2)
$MonthlyExpenseData[3] = GuiCtrlRead($MonthlyExpense3)
$MonthlyExpenseData[4] = GuiCtrlRead($MonthlyExpense4)
$MonthlyExpenseData[5] = GuiCtrlRead($MonthlyExpense5)
$MonthlyExpenseData[6] = GuiCtrlRead($MonthlyExpense6)
$MonthlyExpenseData[7] = GuiCtrlRead($MonthlyExpense7)
$MonthlyExpenseData[8] = GuiCtrlRead($MonthlyExpense8)
$MonthlyExpenseData[9] = GuiCtrlRead($MonthlyExpense9)
$MonthlyExpenseData[10] = GuiCtrlRead($MonthlyExpense10)
$MonthlyExpenseData[11] = GuiCtrlRead($MonthlyExpense11)
$MonthlyExpenseData[12] = GuiCtrlRead($MonthlyExpense12)
$MonthlyExpense1CostData = GuiCtrlRead($MonthlyExpense1Cost)
$MonthlyExpense2CostData = GuiCtrlRead($MonthlyExpense2Cost)
$MonthlyExpense3CostData = GuiCtrlRead($MonthlyExpense3Cost)
$MonthlyExpense4CostData = GuiCtrlRead($MonthlyExpense4Cost)
$MonthlyExpense5CostData = GuiCtrlRead($MonthlyExpense5Cost)
$MonthlyExpense6CostData = GuiCtrlRead($MonthlyExpense6Cost)
$MonthlyExpense7CostData = GuiCtrlRead($MonthlyExpense7Cost)
$MonthlyExpense8CostData = GuiCtrlRead($MonthlyExpense8Cost)
$MonthlyExpense9CostData = GuiCtrlRead($MonthlyExpense9Cost)
$MonthlyExpense10CostData = GuiCtrlRead($MonthlyExpense10Cost)
$MonthlyExpense11CostData = GuiCtrlRead($MonthlyExpense11Cost)
$MonthlyExpense12CostData = GuiCtrlRead($MonthlyExpense12Cost)
$MonthlyExpenseDueDateData[1] = GuiCtrlRead($MonthlyExpense1DueDate)
$MonthlyExpenseDueDateData[2] = GuiCtrlRead($MonthlyExpense2DueDate)
$MonthlyExpenseDueDateData[3] = GuiCtrlRead($MonthlyExpense3DueDate)
$MonthlyExpenseDueDateData[4] = GuiCtrlRead($MonthlyExpense4DueDate)
$MonthlyExpenseDueDateData[5] = GuiCtrlRead($MonthlyExpense5DueDate)
$MonthlyExpenseDueDateData[6] = GuiCtrlRead($MonthlyExpense6DueDate)
$MonthlyExpenseDueDateData[7] = GuiCtrlRead($MonthlyExpense7DueDate)
$MonthlyExpenseDueDateData[8] = GuiCtrlRead($MonthlyExpense8DueDate)
$MonthlyExpenseDueDateData[9] = GuiCtrlRead($MonthlyExpense9DueDate)
$MonthlyExpenseDueDateData[10] = GuiCtrlRead($MonthlyExpense10DueDate)
$MonthlyExpenseDueDateData[11] = GuiCtrlRead($MonthlyExpense11DueDate)
$MonthlyExpenseDueDateData[12] = GuiCtrlRead($MonthlyExpense12DueDate)


$MonthlyExpensesTotal = $MonthlyExpense1CostData + $MonthlyExpense2CostData + $MonthlyExpense3CostData + $MonthlyExpense4CostData + $MonthlyExpense5CostData + _
$MonthlyExpense6CostData + $MonthlyExpense7CostData + $MonthlyExpense8CostData + $MonthlyExpense9CostData + $MonthlyExpense10CostData + $MonthlyExpense11CostData + _
$MonthlyExpense12CostData

If StringLen($MonthlyExpensesTotal) = 4 Then
$SplitForThousands = StringSplit($MonthlyExpensesTotal, "")
$MonthlyExpensesTotal = $SplitForThousands[1] & "," & $SplitForThousands[2] & $SplitForThousands[3] & $SplitForThousands[4]
ElseIf StringLen($MonthlyExpensesTotal) = 5 Then
$SplitForTenThousands = StringSplit($MonthlyExpensesTotal, "")
$MonthlyExpensesTotal = $SplitForTenThousands[1] & $SplitForTenThousands[2] & "," & $SplitForTenThousands[3] & $SplitForTenThousands[4] & $SplitForTenThousands[5]
EndIf

GuiCtrlSetData($MonthlyExpenseTotal, "$ " & $MonthlyExpensesTotal)

IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense1", $MonthlyExpenseData[1] & "|" & $MonthlyExpense1CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense2", $MonthlyExpenseData[2] & "|" & $MonthlyExpense2CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense3", $MonthlyExpenseData[3] & "|" & $MonthlyExpense3CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense4", $MonthlyExpenseData[4] & "|" & $MonthlyExpense4CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense5", $MonthlyExpenseData[5] & "|" & $MonthlyExpense5CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense6", $MonthlyExpenseData[6] & "|" & $MonthlyExpense6CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense7", $MonthlyExpenseData[7] & "|" & $MonthlyExpense7CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense8", $MonthlyExpenseData[8] & "|" & $MonthlyExpense8CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense9", $MonthlyExpenseData[9] & "|" & $MonthlyExpense9CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense10", $MonthlyExpenseData[10] & "|" & $MonthlyExpense10CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense11", $MonthlyExpenseData[11] & "|" & $MonthlyExpense11CostData)
IniWrite("Budget Expense Data.ini", "Monthly", "MonthlyExpense12", $MonthlyExpenseData[12] & "|" & $MonthlyExpense12CostData)


IniWrite("Budget Expense Data.ini", "Monthly", "Total", $MonthlyExpensesTotal)

IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate1", $MonthlyExpenseDueDateData[1])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate2", $MonthlyExpenseDueDateData[2])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate3", $MonthlyExpenseDueDateData[3])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate4", $MonthlyExpenseDueDateData[4])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate5", $MonthlyExpenseDueDateData[5])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate6", $MonthlyExpenseDueDateData[6])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate7", $MonthlyExpenseDueDateData[7])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate8", $MonthlyExpenseDueDateData[8])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate9", $MonthlyExpenseDueDateData[9])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate10", $MonthlyExpenseDueDateData[10])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate11", $MonthlyExpenseDueDateData[11])
IniWrite("Budget Expense Data.ini", "Monthly Due Dates", "MonthlyExpenseDueDate12", $MonthlyExpenseDueDateData[12])

_CheckDueDates()
EndFunc

Func _CheckDueDates()

$CurrentDate = _NowCalcDate()

For $i = 1 To 12 Step +1
If $MonthlyExpenseData[$i] = "" Then
Sleep(10)
Else
$SplitDate = StringSplit($CurrentDate, "/")
$SplitDate2 = StringSplit($MonthlyExpenseDueDateData[$i], "/")
If StringLen($SplitDate2[1]) < 2 Then
$SplitDate2[1] = "0" & $SplitDate2[1]
EndIf
If $SplitDate[2] = $SplitDate2[1] Then
If $SplitDate2[2] < $SplitDate[3] Then
$MinusDay = $SplitDate2[2] - $SplitDate[3]
$MinusDay = $MinusDay + -$MinusDay * 2
MsgBox(0, "Late", $MonthlyExpenseData[$i] & " is " & $MinusDay & " day's overdue!")
Else
$MinusDay = $SplitDate[3] - $SplitDate2[2]
$MinusDay = $MinusDay + -$MinusDay * 2
MsgBox(0, "Bill due", "You have " & $MinusDay & " day's until " & $MonthlyExpenseData[$i] & " is due.")
EndIf
Else
EndIf
EndIf
Next
EndFunc

Func _OpenCalc()
ShellExecute("C:\Windows\system32\calc.exe")
EndFunc

Func _OpenNotepad()
ShellExecute("C:\Windows\system32\notepad.exe")
EndFunc

Func _ChangeHotKey()
$NewHotKey = ""
While $NewHotKey = ""
If $NewHotKey = "" Then
$NewHotKey = InputBox("New Hotkey", "Please choose your HotKey here. For a function key like F11 please input it like the folllowing: {F11}.")
EndIf
WEnd
IniWrite("Budget Expense Data.ini", "Hotkey", "Hotkey", $NewHotKey)
HotKeySet($NewHotKey, "_ShowGui")
EndFunc

Func _ShowGui()
GuiSetState(@SW_SHOW, $BudgetGUI)
EndFunc

Func _HideIt()
GuiSetState(@SW_HIDE, $BudgetGUI)
EndFunc

Func _Exit()
$CheckIfSureOnExit = MsgBox(4, "Exit Program", "Warning, closing will not save your data." & @CRLF & "Please use the Calculate & Submit button's to save your data before closing." & @CRLF & @CRLF & "Do you still wish to exit Personal Budgeter?")
If $CheckIfSureOnExit = 6 Then
Exit
Else
Sleep(10)
EndIf
EndFunc

While 1
Sleep(10)
WEnd
Edited by Damein

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites
Chimaera

erm downloaded it then it kept pestering about a hotkey which i dont want to set unless i know the reason why i would set it.

So i had to force quit it

If your going to add a feature like that write a readme.txt so i know why that feature is there

Share this post


Link to post
Share on other sites
Damein

I get what your saying. But the sourceforge page has a link to a YouTube video explaining the program and it covers the hotkey.


MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites
Chimaera

Ok

I had a look at the vid

A few thoughts

I like a lot of people would not read the extra detail on the Sorceforge page

I just grabbed it and went and was then disappointed because i couldn't use the program.

If you want people to use it dont make it hard for them, maybe prompt to set the key 2 mins after using it and make the hide not work unless a key is set.

I would still suggest a small readme txt file either way as youtube could be down, unlikely i know but things like that do happen.

Popups for due dates is all well and good but what about an option for people that pay thru the bank automatically?

Personally it would drive me nuts with constant popups telling me the rents due etc

Just some thoughts

Nice piece of work though and thanks for sharing

Edited by Chimaera

Share this post


Link to post
Share on other sites
Damein

Yeah, I had thought about setting up an option in the context menu where you can choose to auto alert you or only alert if past due. Maybe once I get around to cleaning up the code I will do so.

Thanks a lot for the feed back :)


MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×