I try to write a Method(position or numLine), which return char from my code. Why I want to do this? - Protection --javascriptresource-- section from changes.
I try to make this code, which must return a char from my code:
returnCharFromMyCode(5);
function returnCharFromMyCode(position){
var fileWithMyScript = new File($.fileName);
return fileWithMyScript.readch(position);
}
But this primitive code return nothing.
May be, I don’t understand how work read(), readch() & readln() methods?
May be this is bad idea to read script as file, and anybody understand how to return a part of code use other logic?