Page 1 of 1

ReferenceError: imns is not defined line 7 (Error code: -991

Posted: Mon Nov 13, 2017 4:35 am
by joelb
Ubuntu 17 4.13.0-16-generic x86_64
Firefox 49.0.7
Imacros for Firefox latest version (this was the problem!!!)

I have a javascript/imacros code with some file operations, reading from CSV files and writing logs.
But I get this error message: ReferenceError: imns is not defined line 437 (Error code: -991)

According to the error message the problem is somewhere in this function.
Could someone help me?
Also... is imns.FIO supported in Linux with Firefox Imacros?
Or I am just forcing something that will never work?

Code: Select all
function count_rows(datasource){
   const CRLF = "\r\n";
   
   var file_i = imns.FIO.openNode(datasource); //This is line 437
   var text = imns.FIO.readTextFile(file_i);
   
   var eol = (text.indexOf(CRLF) == -1) ? "\n" : CRLF;
   
   lines = text.split(eol);
   return lines.length;
}

Re: ReferenceError: imns is not defined line 7 (Error code:

Posted: Mon Nov 13, 2017 5:19 am
by joelb
I thought I have Macros 8.9.7 but it updated itself in the background to the latest.
After reinstalling the old version and turning the update OFF, the problem is solved.