I tried to reed from txt in a button action javascript like that:
this.importDataObject("test.txt", "C:/Users/user/Desktop/test.txt");
var i = this.getField("rand").value;
var oFile = this.getDataObjectContents("test.txt");
var cFile = util.stringFromStream(oFile, "utf-8");
console.println(cFile);
var lines = cFile.split('\n');
I get this error:
RangeError: Invalid argument value.
Doc.importDataObject:1:Field Read:Focus