How to read data from ExampleInternalsTelemetryOutput in real time

Discussion in 'Plugins' started by infiltrado, Sep 15, 2016.

  1. infiltrado

    infiltrado Registered

    Joined:
    Jul 7, 2016
    Messages:
    11
    Likes Received:
    1
    Hi guys, I´m developing a telemetry plugin following the sample. I haven't any problems to compile it and extract data to a text file, but I don't know how to read this file in real time by another aplication created by me in c#,

    The idea is read this txt and resend data to an arduino project, but my c# aplication crashed because the txt file is already in use by the dll, here is a sample code:

    Code:
    while (true)
    {
       string[] lines;
    
       Application.DoEvents();
                    
       lines = System.IO.File.ReadAllLines(@"C:\Program Files (x86)\Steam\steamapps\common\rFactor 2\ExampleInternalsTelemetryOutput.txt");
    
       label1.Text = lines[5];
    }
    I'm bloqued at this point, any help is welcome.

    Thanks.
     
    Last edited by a moderator: Jun 13, 2017

Share This Page