7 Replies Latest reply on Jan 25, 2010 2:00 PM by Roy Marshall

    [JS][CS3] Loading text into memory

    Roy Marshall Level 1



      Am am trying to access an external txt file which holds data for my script.  I have looked at the famous "FindChangeByList" and tried to work from there.  However, I am not going to need input from the user for the txt file location, it will always be the same:


      myFilePath="/Mailer Support/savers.txt";//always going to be there
      myFile = File(myFilePath);
      myData = myFile.open("r", undefined,undefined);
      myLine = myFile.readln(); //I know I need loops for this, but there is text on the first line of the TXT file
      myText = myFile.read();
      alert (myLine);//Blank!!
      myText = myFile.read();
      alert (myText);//Blank also



      Can someone help with this please.


      I know I had a PDF file that detailed the way to call and work with files, but I cannot find it.  Does someone know the name of it?