Skip to main content
Inspiring
November 3, 2011
Answered

OpenFIle directly not Dialog

  • November 3, 2011
  • 1 reply
  • 522 views

Please I dont know where is the mistake.Any help.

function codigo(ruta){

var codigos = new Array();

codigos_tiempo =File(ruta).open("r"); // Open the file for reading

$.writeln(codigos_tiempo);

while (!codigos_tiempo.eof){

   codigos[codigos.length] = codigos_tiempo.readln();

   }

codigos_tiempo.close();

return codigos;

}

var lista_codigos=new Array();

lista_codigos=codigo("~/Documents/Israel/EPISODIO-1-MEDIA-LOG.txt");

$.writeln( lista_codigos)

This topic has been closed for replies.
Correct answer isdito2001

FIXED!!!  This is the good code

function codigo(ruta){

var codigos = new Array();

var _codigos_tiempo =File(ruta);

_codigos_tiempo.open("r","TEXT", "????"); // Open the file for reading

$.writeln(_codigos_tiempo);

while (!_codigos_tiempo.eof){

   codigos[codigos.length] = _codigos_tiempo.readln();

   }

_codigos_tiempo.close();

return codigos;

}

var lista_codigos=new Array();

lista_codigos=codigo("~/Documents/Israel/EPISODIO-1-MEDIA-LOG.txt");

$.writeln( lista_codigos)

1 reply

isdito2001AuthorCorrect answer
Inspiring
November 3, 2011

FIXED!!!  This is the good code

function codigo(ruta){

var codigos = new Array();

var _codigos_tiempo =File(ruta);

_codigos_tiempo.open("r","TEXT", "????"); // Open the file for reading

$.writeln(_codigos_tiempo);

while (!_codigos_tiempo.eof){

   codigos[codigos.length] = _codigos_tiempo.readln();

   }

_codigos_tiempo.close();

return codigos;

}

var lista_codigos=new Array();

lista_codigos=codigo("~/Documents/Israel/EPISODIO-1-MEDIA-LOG.txt");

$.writeln( lista_codigos)