Register Login
Forums    February 6, 2012
TradersStudio Forums
Parameters of function TrStfileopen
Last Post 07-14-2009 12:52 PM by mur ang. 3 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Ulrich Weber
New Member
New Member
Posts:13

--
07-12-2009 07:02 AM
    TrStfileopen requires two parameters.

    The filenamepath and a second one, which is not documented in the Language help.

    It seems that it has to be 0 for read access and 2 for write access.

    In the function ReadFileLines(FileNamePath As String) it is done like this:
            FileNum = trstfileopen(FileNamePath,FileNum)
    In this function FileNum is not initialized explicitly, but assumedly implicitly to 0. This function should be improved.

    Please explain the second parameter of TrStfileopen.
    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    07-12-2009 10:48 AM

    It should not be filenum there it should be the mode we open the file in

    1 is read only

    2 is open for appending new data, this will also create it if needed.

    Ulrich Weber
    New Member
    New Member
    Posts:13

    --
    07-13-2009 04:52 PM

    This script does not run with the browser SeaMonkey.

    I tried both 0 and 1.

    I still believe in a 0 for read only access.

    1 results into a run-time error (#52).

    Maybe it depends on the machine, where TS is running on. I willl try my other tomorrow.

    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    07-14-2009 12:52 PM

    What do you mean Seamonkey browser ?. What does that have to do with a TradersStudio script.

     

    We are checking into file issue will update in a day or so with example code.

    You are not authorized to post a reply.


     TradersStudio, Inc. ® Copyright 2004-2012 All Rights Reserved   Terms Of Use  Privacy Statement