hi im using zenno demo and i want to use the code provided by darkdiver, but i don't know the first thing about this stuff. I have built a chat bot that i want to check the current users number against a list of numbers. i put the file locations in ["tableSearchTextContains"] and ["SourceTable"] as "C:\lists\1.txt" and "C:\lists\2.txt" to which i get Unrecognized escape sequence. can somebody explain to me what I need to do?
Код:
// take text for search from a variable
var textContains = project.Variables["tableSearchTextContains"].Value;
// get table for search
var sourceTable = project.Tables["SourceTable"];
// search in each row
lock(SyncObjects.TableSyncer)
{
for(int i=0; i < sourceTable.RowCount; i++)
{
// read a row (array of cells)
var cells = sourceTable.GetRow(i).ToArray();
// loop through all cells
for (int j=0; j < cells.Length; j++)
{
// check if cell contains specified text, if there are matches return "yes"
if (cells[j].Contains(textContains))
return "yes";
}
}
}
// if nothing found return "no"
return "no";