Hi All,
I have a text file. I plan to search through the file and if any line start with word “parameters”, I wanted to command it out as “;parameter”, then add a new line after it and insert text “.param”.
Here is my code and it does not work.
nLines=document.GetLines();
for(i=1; i
str = document.GetLine (i);
n = str.indexOf(“parameters”);
if (n==0){
document.selection.Text =”;parameters”;
document.selection.NewLine();
document.selection.Text =”param”;
}
}
Another issue. How can I automatically update the line number? Since I insert new line each time I find “paramter”, the total line number changed.
Thanks for your help.