I'm trying to take data from a GUI Input Box and save it to a file to average it out with new data. (I know, I'm terrible at explaining things.)
$paycheck = GUICtrlCreateInput("", 784, 229, 81, 21) $paycheckHistory = GUICtrlCreateButton("$000.00", 881, 429, 60, 20) While 1 $nMsg = GUIGetMsg () Switch $nMsg Case $paycheckHistory $paycheck = GUICtrlRead($paycheck) $file = "averageCheck.au3" if NOT FileExists($file) then _FileCreate($file) FileOpen($file) if $paycheck == "" then FileWriteLine ( $File, "$check1 = 0") else FileWriteLine ($file, "$check = " & $paycheck) endif EndSwitch WEnd
I want the script to add a new variable to the averageCheck.au3 file each time the button is pressed (while saving the previous data), and then average it out. Thanks in advance!