How to count number of lines that starts with...

Alouka

Пользователь
Регистрация
30.07.2015
Сообщения
89
Благодарностей
5
Баллы
8
Hello,

I have a log csv file that i want count number of lines that the two first columns value ar A B for exemple.
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113

Alouka

Пользователь
Регистрация
30.07.2015
Сообщения
89
Благодарностей
5
Баллы
8
I know, but i wonder if there is a manner to really count success times in log file etc...
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113

Alouka

Пользователь
Регистрация
30.07.2015
Сообщения
89
Благодарностей
5
Баллы
8

Alouka

Пользователь
Регистрация
30.07.2015
Сообщения
89
Благодарностей
5
Баллы
8
But is there any way to make a project run the number of success required ? at the end of each template, it counts success lines in log file, then decide if achieved or not yet... ?
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113
But is there any way to make a project run the number of success required ? at the end of each template, it counts success lines in log file, then decide if achieved or not yet... ?
If you want to count project execution successes, use the following C# snippet:
Код:
var name = "Project name";
var tasks = ZennoPoster.TasksList;
foreach(var task in tasks)
{
    var doc = new System.Xml.XmlDocument();
    doc.LoadXml("<Task>" + task + "</Task>");
    var nameNode = doc.SelectSingleNode("Task/Name");
    if(nameNode != null && nameNode.InnerText.Equals(name))
    {
        return doc.SelectSingleNode("Task/ExecutionSettings/DoneSuccesfully").InnerText;
    }
}
Then compare result with required number of successes and decide whether it's achieved or not.
 

Alouka

Пользователь
Регистрация
30.07.2015
Сообщения
89
Благодарностей
5
Баллы
8
Super ! Thank you :-)
 
  • Спасибо
Реакции: VladZen

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113

Alouka

Пользователь
Регистрация
30.07.2015
Сообщения
89
Благодарностей
5
Баллы
8
But how to count the number of successes.. i didn't understand it well
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)