I played around with this script for a while now and I ended up rewriting it some. Unfortunately, I don't know enough about Kixtart to modify the script from Witto to fit my needs so I had another go at it myself.

There are two balance fields that I need to add up. The balance is in a different field depending on what type of bill it is so I need to add up the array elements in array positions 66 and 71.

The script below works for me except for the fact that it doesn't read the very first line in the csv file which causes the balance sum to be off. Am I missing something to make it read the first line? Here's what I have so far.

Thanks.

 Code:
Break ON
DIM $csv,$bal,$csv_array,$read,$controlnum,$line,$x
RedirectOutput("C:\temp\output.txt",1)

$csv="C:\temp\test.csv"
If Open(3,$csv) = 0
$read=ReadLine(3)
While @ERROR = 0
$read=ReadLine(3)
$csv_array=Split($read,"|")
If UBound($csv_array)

;Add together first balances
? "Account:  " + ($csv_array[5]) + "   Balance:   " + ($csv_array[71])
$cintndc = Round($csv_array[66],2)
$balsndc = $balsndc + $cintndc
;$balsndc ?

;add together second balances
$cintproc = Round($csv_array[71],2)
$balsproc = $balsproc + $cintproc
;$balsproc ?

Else
	EndIf
Loop

@CRLF

;add together first and second balances
$total = $balsndc + $balsproc
"Total balance is: " + $total ?


$read = Close(3)

RedirectOutput("")