﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
237	FileSearchLine() and _ArraySum()	Jayowee (jay_paans@…		"I have two ideas:
1) {{{FileSearchLine(""filename"", ""searchstring"")}}} which returns the (1-based) linenumber of the first occurense of the searchstring.

Possible script:
{{{
For $line= 1 To _FileCountLines($file)
 If FileReadLine($file, $line) = ""searchstring"" Then Return $line
Next
}}}

Maybe a parameter could make this function return an array with ''all'' occurences (if more than one)...

2) {{{_ArraySum($array)}}} which simply adds up all of the arrays elements. I think a condition must be that all elements are numbers because you can't really add up strings.

Possible script:
{{{
Dim $sum=0
For $n= 1 To UBound($array)
 $sum += $array[$n]
Next
Return $sum
}}}

I hope these are two ideas you guys can use.
Jay"	Feature Request	closed		AutoIt		None	Rejected	FileSearchLine _ArraySum	
