Announcement

Collapse
No announcement yet.

EFS file.setPosition() issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • EFS file.setPosition() issue

    I try to make study which will write files, and after writing string to file, put cariiage to the fixed place and put string began from this place.

    function preMain() {
    setPriceStudy(true);
    setShowCursorLabel(false);
    }


    function main()
    {
    var a = new File("temp.csv");
    var b = new File("SLW3-SLV3.txt");

    b.open("rt");
    b.getLength();

    a.open("at+");
    a.write("Hello world! carriage:");
    a.writeln(a.getPosition()+"and"+b.getLength());
    a.setPosition(150);
    a.write("NewPosition:"+a.getPosition());
    a.close();
    b.close();


    }

    But I see, that setPosition() gets only 0! And it's anyway write the string "NewPosition:" not begining from 0! How can I solve it?
    Last edited by bos-fx; 09-13-2012, 12:18 PM.
Working...
X