Hello DOJO
I am starting to use automation script
I am not using DIS
I need to generate an export text file by using some properties of elements
I am not able to use system functionalities like substring or substr
I hav tried other functionnalities
(string.IsNullOrEmpty(param4) is OK
param4.Split(',')[0]; is OK
Element[] elems = engine.FindElementsInView(28);
for (int i = 0; i < elems.Length; i++)
{
string param4 = elems[i].ElementName;
string Extractline = "EQUIPSM"+"¤"+"BTBS15"+"¤"+"PARC"+"¤"+ param4 +"¤"+param4.substring(23,7)+"<ATR>";
sr.WriteLine(Extractline);
}
param4.substring(23,7) give me an error: string does not contain a definition for substring...
Is existing an other way to extract part of strings ?
Hi Joel,
'Substring' starts with a capital which is probably the reason you're seeing this exception. Creating automation scripts in DIS would also indicate any syntax errors that are encountered while developing a script.
Thank you Sebastiaan
so easy that I messed it 🙂