<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>VoiceBot RSS: Trying to write elite danerous journal reader</title>
<atom:link href="https://www.voicebot.net/Discussions/RSS/?TopicID=5af2aeb4-29e1-41f1-a199-0854f37048e8" rel="self" type="application/rss+xml" />
<link>https://www.voicebot.net/Discussions/RSS/?TopicID=5af2aeb4-29e1-41f1-a199-0854f37048e8</link>
<description>VoiceBot RSS: Trying to write elite danerous journal reader</description>
<lastBuildDate>Mon, 20 Jul 2026 12:38:59 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.voicebot.net/Discussions/RSS/?TopicID=5af2aeb4-29e1-41f1-a199-0854f37048e8</generator>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#19</link>
<pubDate>Fri, 14 Dec 2018 06:14:26 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#19</guid>
<category>VoiceBot</category>
<description><![CDATA[Due to the large change in the journals after the recent up I have rewritten the journal reader with a different approach that seems to be working well. this is still a beta. still open to suggestion  for improvement
Code
Copy
Select All
using System;
using System.Drawing;
using System.Coll...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Due to the large change in the journals after the recent up I have rewritten the journal reader with a different approach that seems to be working well. this is still a beta. still open to suggestion  for improvement<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019f7f8968e17779bbeefa28b16e63e1" class="ClipboardCopyControl"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019f7f8968e17779bbeefa28b16e63e1Js'); return false;"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019f7f8968e17779bbeefa28b16e63e1Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Security.Permissions;

public static class VoiceBotScript
{
        
        static string logpath = Environment.ExpandEnvironmentVariables (@"%USERPROFILE%\\Saved Games\\Frontier Developments\\Elite Dangerous\\");
        private static string st;
        private static Char delimiter = ',';
        private static int found_event =0;
        private static int oldfound_event=0;
        
        private static string noQuotes;
        private static string[] substrings;
        private static string[] event_substrings;
        
        private static int DiscoveryScan=1, StartJump =2 , FSDJump=3 , DockingGranted=4 , Undocked=5 , Loadout=6 ;
        
    public static void Run(IntPtr windowHandle)
    {
        BFS.Speech.TextToSpeech(" Reading Elite log entries");
        ReadLog();        
    }    
    public static void ReadLog()
        {
        // creat event watcher    
        // Create a new FileSystemWatcher and set its properties.
            FileSystemWatcher watcher = new FileSystemWatcher();
            watcher.Path = logpath;
            // Watch for changes in LastWrite times, and the renaming of files or directories. 
            watcher.NotifyFilter = NotifyFilters.LastWrite; 
            //removed to improve performance NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Size| NotifyFilters.FileName;         
            // Add event handlers.
            watcher.Changed += new FileSystemEventHandler(OnChanged);
            //watcher.Created += new FileSystemEventHandler(OnChanged);       
            // Begin watching.
            watcher.EnableRaisingEvents = true;
            // Wait for the user to quit the program.   
            //infinite loop
            while(true)
            {
                // improves cpu load
               BFS.VoiceBotActions.Delay(1);
            }
        }

        // Define the event handlers.
        private static void OnChanged(object source, FileSystemEventArgs e)
        {
            // Specify what is done when a file is changed, created, or deleted.
            var directory = new DirectoryInfo(logpath);
            var myFile = (from f in directory.GetFiles("Journal.*.log")
                          orderby f.LastWriteTime descending
                          select f).First();
            try
            {

                string path = logpath + myFile; 
                using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                using (var sf = new StreamReader(fs, Encoding.UTF8))  //.Default
                {
                // read the file save the last 2 lines for comparision
                    //var logList = new List&lt;string&gt;();
                    string lastTime = "";
                    string thisTime = "";
                    
                    do
                    {
                        st = sf.ReadLine();
                        
                        String[] substrings = st.Split(delimiter);
                
                        
                        if (substrings[1] == " \"event\":\"DiscoveryScan\"")found_event=DiscoveryScan ;
                        if (substrings[1] == " \"event\":\"StartJump\"")found_event=StartJump;
                        if (substrings[1] == " \"event\":\"FSDJump\"")
                        {
                            found_event=FSDJump;
                            event_substrings = substrings;
                         }
                        if (substrings[1] == " \"event\":\"DockingGranted\"")
                        {
                            found_event=DockingGranted;
                            event_substrings = substrings;
                         }
                        if (substrings[1] == " \"event\":\"Undocked\"")found_event=Undocked;
                        if (substrings[1] == " \"event\":\"Loadout\"")
                        {
                            found_event=Loadout;
                            event_substrings = substrings;
                                
                        }
                    
                    } while (!sf.EndOfStream) ;
      
              
             // check for new events 
             
                   
                    if (oldfound_event != found_event)
                    {
                       oldfound_event = found_event;
                           
                    // check for events 
                        if (found_event == DiscoveryScan)  // dicover found
                        {
                            BFS.Speech.TextToSpeech("found new discoveries");
                          }
                       /* else if (found_event == StartJump)  // jump started 
                        {
                          BFS.Speech.TextToSpeech("jump started");
                            string noQuotes = event_substrings[3].Replace("\"", "");
                            string[] name = noQuotes.Split(':'); 
                            BFS.ScriptSettings.WriteValue("Lastsystem",BFS.ScriptSettings.ReadValue("Currentsystem"));
                            BFS.ScriptSettings.WriteValue("Currentsystem",name[1]);
                         
                        }*/
                        else if (found_event == FSDJump)  // jump complete
                        {
                            BFS.Speech.TextToSpeech("jump complete");                                                   
                            string noQuotes = event_substrings[2].Replace("\"", "");
                            string[] name = noQuotes.Split(':'); 
                            BFS.ScriptSettings.WriteValue("Lastsystem",BFS.ScriptSettings.ReadValue("Currentsystem"));
                            BFS.ScriptSettings.WriteValue("Currentsystem",name[1]);
                            //BFS.Speech.TextToSpeech(BFS.ScriptSettings.ReadValue("Lastsystem"));
                           
                            if(BFS.ScriptSettings.ReadValueBool("AutoScan"))  //if autoscan is true scan every system
                            {
                            BFS.VoiceBotActions.RunMacro("system scan");
                            }
                        }
                        else if (found_event == DockingGranted)  // docking granted
                        {
                            
                            string noQuotes = event_substrings[4].Replace("\"", ""); 
                            string[] name = noQuotes.Split(':');
                            BFS.Speech.TextToSpeech("Docking has beeen granted at" + name[1]);
                            BFS.VoiceBotActions.RunMacro("docking prep");
                            
                        }
                       
                        else if (found_event == Undocked) // luanch
                        {
                            BFS.VoiceBotActions.RunMacro("launch");
                            
                        }
                                            
                        else if (found_event == Loadout)  // outfit
                        {
                            string noQuotes = event_substrings[2].Replace("\"", "");
                            noQuotes = noQuotes.Replace("_", " ");
                            string[] name = noQuotes.Split(':');
                            BFS.Speech.TextToSpeech("your " + name[1] +"is ready to go");
                            BFS.ScriptSettings.WriteValue("Shiptype",name[1]);
                        }
                    }
                
                }
            
            }
                catch (Exception )
                {
                     BFS.Speech.TextToSpeech("error in second part");
                }
             
           
       }
}</pre><textarea id="code019f7f8968e17779bbeefa28b16e63e1" name="code019f7f8968e17779bbeefa28b16e63e1" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#18</link>
<pubDate>Sat, 01 Dec 2018 17:37:25 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#18</guid>
<category>VoiceBot</category>
<description><![CDATA[Made some performance changes now uses environment variable for file path so works on drive letters other then c:
Introduced delay loop in infinite loop to keep script open dramatically reducing cpu load
Code
Copy
Select All
using System;
using System.Drawing;
using System.Collections.Gene...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Made some performance changes now uses environment variable for file path so works on drive letters other then c:<br/>
<br/>
Introduced delay loop in infinite loop to keep script open dramatically reducing cpu load<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019f7f8968f0727c9bfd059eeb7df917" class="ClipboardCopyControl"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019f7f8968f0727c9bfd059eeb7df917Js'); return false;"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019f7f8968f0727c9bfd059eeb7df917Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Security.Permissions;

public static class VoiceBotScript
{
        static string oldTimeStamp;
        static string logpath = Environment.ExpandEnvironmentVariables (@"%USERPROFILE%\\Saved Games\\Frontier Developments\\Elite Dangerous\\");
        private static string st;
        private static string oldst;   
    public static void Run(IntPtr windowHandle)
    {
        BFS.Speech.TextToSpeech(" Reading Elite log entries");
        ReadLog();        
    }    
    public static void ReadLog()
        {
        // creat event watcher    
        // Create a new FileSystemWatcher and set its properties.
            FileSystemWatcher watcher = new FileSystemWatcher();
            watcher.Path = logpath;
            // Watch for changes in LastWrite times, and the renaming of files or directories. 
            watcher.NotifyFilter = NotifyFilters.LastWrite; 
            //removed to improve performance NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Size| NotifyFilters.FileName;         
            // Add event handlers.
            watcher.Changed += new FileSystemEventHandler(OnChanged);
            //watcher.Created += new FileSystemEventHandler(OnChanged);       
            // Begin watching.
            watcher.EnableRaisingEvents = true;
            // Wait for the user to quit the program.   
            //infinite loop
            while(true)
            {
                // improves cpu load
               BFS.VoiceBotActions.Delay(1);
            }
        }

        // Define the event handlers.
        private static void OnChanged(object source, FileSystemEventArgs e)
        {
            // Specify what is done when a file is changed, created, or deleted.
            var directory = new DirectoryInfo(logpath);
            var myFile = (from f in directory.GetFiles("Journal.*.log")
                          orderby f.LastWriteTime descending
                          select f).First();
            try
            {

                string path = logpath + myFile; 
                using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                using (var sf = new StreamReader(fs, Encoding.UTF8))  //.Default
                {
                // read the file save the last 2 lines for comparision
                    //var logList = new List&lt;string&gt;();
                    string lastTime = "";
                    string thisTime = "";
                    
                    do
                    {
                        st = sf.ReadLine();
                        lastTime = thisTime;
                        thisTime = st;
                    } while (!sf.EndOfStream) ;
                    // if the last line contains music save the line befor to st for inspection
                   //changed to a faster comparision if (thisTime.Contains("Music")) 
                   if (thisTime.Substring(47, 5) == "Music")
                   {
                
                        st = lastTime; 
                    }
                                       
                    /* if(chkStr.Contains("Loadout"))
                    {
                        BFS.ScriptSettings.WriteValue("loadout",st);
                    } */
                

                // serperate the usable data pairs
                    Char delimiter = ',';
                    String[] substrings = st.Split(delimiter);
                    string noQuotes = substrings[0].Replace("\"", "");
                    string[] timestamp = noQuotes.Split(':');
              
             // check for new events 
             
                   
                    if (oldTimeStamp != timestamp[3])
                    {
                       oldTimeStamp = timestamp[3];
                           
                    // check for events 
                        if (substrings[1] == " \"event\":\"DiscoveryScan\"")
                        {
                            BFS.Speech.TextToSpeech("found new discoveries");
                          }
                        /* else if (substrings[1] == " \"event\":\"StartJump\"")
                        {
                          BFS.Speech.TextToSpeech("jump started");
                         
                        }*/
                         else if (substrings[1] == " \"event\":\"FSDJump\"")
                        {
                            //BFS.Speech.TextToSpeech("jump complete");                                                   
                            noQuotes = substrings[2].Replace("\"", "");
                            string[] name = noQuotes.Split(':'); 
                            BFS.ScriptSettings.WriteValue("Lastsystem",BFS.ScriptSettings.ReadValue("Currentsystem"));
                            BFS.ScriptSettings.WriteValue("Currentsystem",name[1]);
                            //BFS.Speech.TextToSpeech(BFS.ScriptSettings.ReadValue("Lastsystem"));
                           
                            if(BFS.ScriptSettings.ReadValueBool("AutoScan"))  //if autoscan is true scan every system
                            {
                            BFS.VoiceBotActions.RunMacro("system scan");
                            }
                        }
                        else if (substrings[1] == " \"event\":\"DockingGranted\"")
                        {
                            noQuotes = substrings[4].Replace("\"", "");
                            string[] name = noQuotes.Split(':');
                            BFS.Speech.TextToSpeech("Docking has beeen granted at" + name[1]);
                            BFS.VoiceBotActions.RunMacro("docking prep");
                        }
                       
                        else if (substrings[1] == " \"event\":\"Undocked\"")
                        {
                            BFS.VoiceBotActions.RunMacro("launch");
                            
                        }
                                            
                        else if (substrings[1] == " \"event\":\"Loadout\"")
                        {
                            
                            noQuotes = substrings[2].Replace("\"", "");
                            noQuotes = noQuotes.Replace("_", " ");
                            string[] name = noQuotes.Split(':');
                            BFS.Speech.TextToSpeech("your " + name[1] +"is ready to go");
                            BFS.ScriptSettings.WriteValue("Shiptype",name[1]);
                        }
                    }
                
                }
            
            }
                catch (Exception )
                {
                     BFS.Speech.TextToSpeech("error in second part");
                }
             
           
       }
}</pre><textarea id="code019f7f8968f0727c9bfd059eeb7df917" name="code019f7f8968f0727c9bfd059eeb7df917" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#17</link>
<pubDate>Tue, 23 Oct 2018 22:07:30 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#17</guid>
<category>VoiceBot</category>
<description><![CDATA[at least the program works and all we need is to make it better.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
at least the program works and all we need is to make it better.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#16</link>
<pubDate>Fri, 05 Oct 2018 17:50:44 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#16</guid>
<category>VoiceBot</category>
<description><![CDATA[What could go wrong?
well, hopefully eventually someone that knows his shit will join us haha]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
What could go wrong?<br/>
<br/>
well, hopefully eventually someone that knows his shit will join us haha
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#15</link>
<pubDate>Fri, 05 Oct 2018 14:22:31 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#15</guid>
<category>VoiceBot</category>
<description><![CDATA[we are in great shape 2 non programmers writing a script using a platform we have no idea how to work with for a voice control program to play a game where the rule change all the time .
https://github.com/orgs/EDLR-for-voicebot/teams]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
we are in great shape 2 non programmers writing a script using a platform we have no idea how to work with for a voice control program to play a game where the rule change all the time .<br/>
<br/>
https://github.com/orgs/EDLR-for-voicebot/teams
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#14</link>
<pubDate>Fri, 05 Oct 2018 10:08:59 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#14</guid>
<category>VoiceBot</category>
<description><![CDATA[Quote:
rodrigo_vda  Very glad you liked the reader and want to help . the complete script  is available
https://www.voicebot.net/Profiles/View/?ID=4d46883b-fbaf-411d-a00f-a78afaf7fc7c
Nut used GitHub before so not sure i set it up correctly but here is the link
https://github.com/CMDRdab42/ED...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<div class="BackGrey"><div class="Text"><div><b>Quote:</b></div>rodrigo_vda  Very glad you liked the reader and want to help . the complete script  is available <br/>
https://www.voicebot.net/Profiles/View/?ID=4d46883b-fbaf-411d-a00f-a78afaf7fc7c<br/>
<br/>
Nut used GitHub before so not sure i set it up correctly but here is the link<br/>
https://github.com/CMDRdab42/EDLR<br/>
<br/>
I am not a programmer so look forward to some help on this project</div></div><br/>
<br/>
Well, bad news, I'm not a programmer either, and I have never programmed in C# before, The closest I know is C++ but yeah, all are kind of similar, so I can do something.<br/>
<br/>
However, I'm sure I'm far from a good c# programmer, but if I can help a little bit, maybe we could begin to create an alternative to EDDI <img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/face-laugh-squint.light.svg" alt=":D" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":D" /><br/>
<br/>
PS: I've never participated in a GitHub project before so idk how to proceed either, but maybe we should get some way to chat each other?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#13</link>
<pubDate>Thu, 04 Oct 2018 21:55:23 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#13</guid>
<category>VoiceBot</category>
<description><![CDATA[rodrigo_vda  Very glad you liked the reader and want to help . the complete script  is available
https://www.voicebot.net/Profiles/View/?ID=4d46883b-fbaf-411d-a00f-a78afaf7fc7c
Nut used GitHub before so not sure i set it up correctly but here is the link
https://github.com/CMDRdab42/EDLR
I am...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
rodrigo_vda  Very glad you liked the reader and want to help . the complete script  is available <br/>
https://www.voicebot.net/Profiles/View/?ID=4d46883b-fbaf-411d-a00f-a78afaf7fc7c<br/>
<br/>
Nut used GitHub before so not sure i set it up correctly but here is the link<br/>
https://github.com/CMDRdab42/EDLR<br/>
<br/>
I am not a programmer so look forward to some help on this project
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#12</link>
<pubDate>Thu, 04 Oct 2018 14:15:08 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#12</guid>
<category>VoiceBot</category>
<description><![CDATA[I'm really interested in your project, both in trying it, and helping develop it.
First of all, I've just purchased VoiceBot, how can I use your code?
Second, how about you create a github and collect people to work on it? =)]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm really interested in your project, both in trying it, and helping develop it.<br/>
<br/>
First of all, I've just purchased VoiceBot, how can I use your code?<br/>
<br/>
Second, how about you create a github and collect people to work on it? =)
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#11</link>
<pubDate>Mon, 27 Aug 2018 12:51:35 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#11</guid>
<category>VoiceBot</category>
<description><![CDATA[The Latest update to the elite log reader boosting performance
Code
Copy
Select All
using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Security.Permissions;
public stat...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
The Latest update to the elite log reader boosting performance <br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019f7f896919706e8549add84b36855b" class="ClipboardCopyControl"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019f7f896919706e8549add84b36855bJs'); return false;"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019f7f896919706e8549add84b36855bJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Security.Permissions;

public static class VoiceBotScript
{
        static string oldTimeStamp;
        static string logpath = "C:\\Users\\"+ Environment.UserName +"\\Saved Games\\Frontier Developments\\Elite Dangerous\\";
        private static string st;
        private static string oldst;
        
    public static void Run(IntPtr windowHandle)
    {
        
        BFS.Speech.TextToSpeech(" Reading Elite log entries");
        ReadLog();
        
    }
    
       public static void ReadLog()
        {
       
// creat event watcher    
        // Create a new FileSystemWatcher and set its properties.
            FileSystemWatcher watcher = new FileSystemWatcher();
            watcher.Path = logpath;
            // Watch for changes in LastWrite times, and the renaming of files or directories. 
            watcher.NotifyFilter = NotifyFilters.LastWrite; 
            //removed to improve performance NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Size| NotifyFilters.FileName;
           
            // Add event handlers.
            watcher.Changed += new FileSystemEventHandler(OnChanged);
            //watcher.Created += new FileSystemEventHandler(OnChanged);
       
            // Begin watching.
            watcher.EnableRaisingEvents = true;

            // Wait for the user to quit the program.
   
            //infinite loop
            while(true)
            {

            }
        }

        // Define the event handlers.
        private static void OnChanged(object source, FileSystemEventArgs e)
        {
            // Specify what is done when a file is changed, created, or deleted.

            var directory = new DirectoryInfo(logpath);
            var myFile = (from f in directory.GetFiles("Journal.*.log")
                          orderby f.LastWriteTime descending
                          select f).First();

            try
            {

                string path = logpath + myFile; 
                using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                using (var sf = new StreamReader(fs, Encoding.UTF8))  //.Default
                {
                // read the file save the last 2 lines for comparision
                    //var logList = new List&lt;string&gt;();
                    string lastTime = "";
                    string thisTime = "";
                    
                    do
                    {
                        st = sf.ReadLine();
                        lastTime = thisTime;
                        thisTime = st;
                    } while (!sf.EndOfStream) ;
                    // if the last line contains music save the line befor to st for inspection
                   //changed to a faster comparision if (thisTime.Contains("Music")) 
                   if (thisTime.Substring(47, 5) == "Music")
                   {
                
                        st = lastTime; 
                    }
                    
                    /* if(chkStr.Contains("Loadout"))
                    {
                        BFS.ScriptSettings.WriteValue("loadout",st);
                    } */
                

                // serperate the usable data pairs
                    Char delimiter = ',';
                    String[] substrings = st.Split(delimiter);
                    string noQuotes = substrings[0].Replace("\"", "");
                    string[] timestamp = noQuotes.Split(':');
              
             // check for new events 
                    if (oldTimeStamp != timestamp[3])
                    {
                        oldTimeStamp = timestamp[3];
                                      
                    // check for events 
                        if (substrings[1] == " \"event\":\"DiscoveryScan\"")
                        {
                            BFS.Speech.TextToSpeech("found new discoveries");
                         }
                         else if (substrings[1] == " \"event\":\"StartJump\"")
                        {
                          BFS.Speech.TextToSpeech("jump started");
                        }
                         else if (substrings[1] == " \"event\":\"FSDJump\"")
                        {
                            BFS.Speech.TextToSpeech("jump complete");
                           
                            
                            noQuotes = substrings[2].Replace("\"", "");
                            string[] name = noQuotes.Split(':');
                           
                            
                            BFS.ScriptSettings.WriteValue("Lastsystem",BFS.ScriptSettings.ReadValue("Currentsystem"));
                            BFS.ScriptSettings.WriteValue("Currentsystem",name[1]);
                            //BFS.Speech.TextToSpeech(BFS.ScriptSettings.ReadValue("Lastsystem"));
                           
                            if(BFS.ScriptSettings.ReadValueBool("AutoScan"))  //if autoscan is true scan every system
                            {
                            BFS.VoiceBotActions.RunMacro("system scan");
                            }
                        }
                        else if (substrings[1] == " \"event\":\"DockingGranted\"")
                        {
                            
                            noQuotes = substrings[4].Replace("\"", "");
                            string[] name = noQuotes.Split(':');
                            BFS.Speech.TextToSpeech("Docking has beeen granted at" + name[1]);
                            BFS.VoiceBotActions.RunMacro("docking prep");
                        }
                       
                        else if (substrings[1] == " \"event\":\"Undocked\"")
                        {
                            BFS.VoiceBotActions.RunMacro("launch");
                            
                        }
                       
                        else if (substrings[1] == " \"event\":\"Loadout\"")
                        {
                            noQuotes = substrings[2].Replace("\"", "");
                            noQuotes = noQuotes.Replace("_", " ");
                            string[] name = noQuotes.Split(':');
                            BFS.Speech.TextToSpeech("your " + name[1] +"is ready to go");
                            BFS.ScriptSettings.WriteValue("Shiptype",name[1]);
                        }
                    }
                
                }
            
            }
                catch (Exception be)
                {
                     BFS.Speech.TextToSpeech("error in second part");
                }
             
           
       }
}</pre><textarea id="code019f7f896919706e8549add84b36855b" name="code019f7f896919706e8549add84b36855b" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#10</link>
<pubDate>Sat, 14 Jul 2018 15:23:33 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#10</guid>
<category>VoiceBot</category>
<description><![CDATA[Should now report
Docking granted  , Jump complete , undocked and found new discovery
Jump complete I use the to scan a system when i jump in
Docking granted  I use this to start a macro to raise shield , send message that i am coming in and lower landing gear
all code in above up to date and...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Should now report <br/>
Docking granted  , Jump complete , undocked and found new discovery<br/>
<br/>
Jump complete I use the to scan a system when i jump in<br/>
Docking granted  I use this to start a macro to raise shield , send message that i am coming in and lower landing gear<br/>
<br/>
all code in above up to date and working
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#9</link>
<pubDate>Sat, 14 Jul 2018 02:54:02 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#9</guid>
<category>VoiceBot</category>
<description><![CDATA[It occurred to me other users could not use the code because the file path was set for my system.
the file path is now stored in the variable logpath and should automatically go to the save file for elite dangerous. if not change the path inside the quotes to match your save file location.  The ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
It occurred to me other users could not use the code because the file path was set for my system.<br/>
<br/>
the file path is now stored in the variable logpath and should automatically go to the save file for elite dangerous. if not change the path inside the quotes to match your save file location.  The double \\ is required.<br/>
<br/>
 static string logpath = "C:\\Users\\"+ Environment.UserName +"\\Saved Games\\Frontier Developments\\Elite <br/>
<br/>
Currently the script still only informs you that an event occurred but could soon contain Game data like system name , station details or you could launch other scripts from it.<br/>
<br/>
 <br/>
Updated Code<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019f7f89692c7177b0e3c2c8d4f1f2e5" class="ClipboardCopyControl"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019f7f89692c7177b0e3c2c8d4f1f2e5Js'); return false;"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019f7f89692c7177b0e3c2c8d4f1f2e5Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Security.Permissions;

public static class VoiceBotScript
{
        static string oldTimeStamp;
        static string logpath = "C:\\Users\\"+ Environment.UserName +"\\Saved Games\\Frontier Developments\\Elite Dangerous\\";
        private static string st;
        private static string oldst;
        
    public static void Run(IntPtr windowHandle)
    {
        
        BFS.Speech.TextToSpeech(" Now reading log entries");
        ReadLog();
        
    }
    
       public static void ReadLog()
        {
        BFS.ScriptSettings.WriteValueBool("running",true);
// creat event watcher    
        // Create a new FileSystemWatcher and set its properties.
            FileSystemWatcher watcher = new FileSystemWatcher();
            watcher.Path = logpath;
            // Watch for changes in LastWrite times, and the renaming of files or directories. 
            watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite;
           // | NotifyFilters.Size| NotifyFilters.FileName;
           
            // Add event handlers.
            watcher.Changed += new FileSystemEventHandler(OnChanged);
            watcher.Created += new FileSystemEventHandler(OnChanged);
       
            // Begin watching.
            watcher.EnableRaisingEvents = true;

            //Console.WriteLine("elite log read v 1.1");
           // infinite loop
           while(true)
            {

            }

        }

        // Define the event handlers.
        private static void OnChanged(object source, FileSystemEventArgs e)
        {
            // Specify what is done when a file is changed, created, or deleted.

            var directory = new DirectoryInfo(logpath);
            var myFile = (from f in directory.GetFiles("Journal.*.log")
                          orderby f.LastWriteTime descending
                          select f).First();

            try
            {

                string path = logpath + myFile; 
                using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                using (var sf = new StreamReader(fs, Encoding.UTF8))  //.Default
                {
                // read the file save the last line
                    do
                    {
                        st = sf.ReadLine();
                        // if the last line is music save the value before line before it
                        if(st.Contains("Music"))
                        {
                            st = oldst;
                        }
                        oldst = st;
                     /*   lookiing for ship details for future use  
                        if(st.Contains("Loadout"))
                        {
                            BFS.ScriptSettings.WriteValue("loadout",st);
                        } */
                    } while (!sf.EndOfStream) ;

                // serperate the usable data pairs
                    Char delimiter = ',';
                    String[] substrings = st.Split(delimiter);
                    string noQuotes = substrings[0].Replace("\"", "");
                    string[] timestamp = noQuotes.Split(':');
              
             // check for new events 
                    if (oldTimeStamp != timestamp[3])
                    {
                        oldTimeStamp = timestamp[3];
                                      
                    // check for events 
                        if (substrings[1] == " \"event\":\"DiscoveryScan\"")
                        {
                            BFS.Speech.TextToSpeech("found new discoveries");
                         }
                         else if (substrings[1] == " \"event\":\"StartJump\"")
                        {
                          BFS.Speech.TextToSpeech("jump started");
                        }
                         else if (substrings[1] == " \"event\":\"FSDJump\"")
                        {
                            BFS.Speech.TextToSpeech("jump complete");
                           
                            
                            noQuotes = substrings[2].Replace("\"", "");
                            string[] name = noQuotes.Split(':');
                           
                            
                            BFS.ScriptSettings.WriteValue("Lastsystem",BFS.ScriptSettings.ReadValue("Currentsystem"));
                            BFS.ScriptSettings.WriteValue("Currentsystem",name[1]);
                            //BFS.Speech.TextToSpeech(BFS.ScriptSettings.ReadValue("Lastsystem"));
                           
                            if(BFS.ScriptSettings.ReadValueBool("AutoScan"))  //if autoscan is true scan every system
                            {
                            BFS.VoiceBotActions.RunMacro("system scan");
                            }
                        }
                        else if (substrings[1] == " \"event\":\"DockingGranted\"")
                        {
                            
                            noQuotes = substrings[4].Replace("\"", "");
                            string[] name = noQuotes.Split(':');
                            BFS.Speech.TextToSpeech("Docking has beeen granted at" + name[1]);
                            BFS.VoiceBotActions.RunMacro("docking prep");
                        }
                       
                        else if (substrings[1] == " \"event\":\"Undocked\"")
                        {
                            BFS.VoiceBotActions.RunMacro("launch");
                            
                        }
                        else if (substrings[1] == " \"event\":\"Docked\"")
                        {
                            BFS.Speech.TextToSpeech("Docked and safe");
                        }
                    }
                
                }
            
            }
                catch (Exception be)
                {
                     BFS.Speech.TextToSpeech("error in second part");
                }
             
           
       }
}</pre><textarea id="code019f7f89692c7177b0e3c2c8d4f1f2e5" name="code019f7f89692c7177b0e3c2c8d4f1f2e5" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#8</link>
<pubDate>Fri, 13 Jul 2018 17:57:01 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#8</guid>
<category>VoiceBot</category>
<description><![CDATA[That's fantastic! I'm sure other people in the Elite community will appreciate this as well.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
That's fantastic! I'm sure other people in the Elite community will appreciate this as well. <img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#7</link>
<pubDate>Fri, 13 Jul 2018 03:59:47 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#7</guid>
<category>VoiceBot</category>
<description><![CDATA[Good new the code has be reduced by a large amount , no more coping the file then trying to read it as using a stream I can now read it as its written,
New discoveries, Docking granted , docked and undocked  seem to work every time ,  fsd jump started and complete still don't seem to work.  Code...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Good new the code has be reduced by a large amount , no more coping the file then trying to read it as using a stream I can now read it as its written, <br/>
<br/>
New discoveries, Docking granted , docked and undocked  seem to work every time ,  fsd jump started and complete still don't seem to work.  Code still sloppy but very close <br/>
<br/>
-- Code removed make it easier to use the most updated code version
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#6</link>
<pubDate>Thu, 12 Jul 2018 19:40:25 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#6</guid>
<category>VoiceBot</category>
<description><![CDATA[I hope you're able to get it sorted out, this looks like a very interesting script!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I hope you're able to get it sorted out, this looks like a very interesting script!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#5</link>
<pubDate>Thu, 12 Jul 2018 00:56:23 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#5</guid>
<category>VoiceBot</category>
<description><![CDATA[sorry Seems jump complete and jump started are having problems ,  found new object, docking granted, docked and undocked seems to work fine. must be the time between events affecting things]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
sorry Seems jump complete and jump started are having problems ,  found new object, docking granted, docked and undocked seems to work fine. must be the time between events affecting things
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#4</link>
<pubDate>Wed, 11 Jul 2018 23:28:27 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#4</guid>
<category>VoiceBot</category>
<description><![CDATA[The Reader seems to work but needs testers ,  Currently it will only report (text to speech) what event has occurred.
Later it could provide much more information to the player.
Again I am not a programmer, there is probably a better way to do this but is seems to work without slowing down perf...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
The Reader seems to work but needs testers ,  Currently it will only report (text to speech) what event has occurred. <br/>
Later it could provide much more information to the player.<br/>
<br/>
Again I am not a programmer, there is probably a better way to do this but is seems to work without slowing down performance<br/>
<br/>
it does create one file called working.txt  in C:\Users\"username"\Saved Games\Frontier Developments\Elite Dangerous<br/>
<br/>
it will Monitor <br/>
Docking granted <br/>
Docked<br/>
undocked<br/>
discovery scanner<br/>
start fsd jump<br/>
end fsd jump<br/>
<br/>
Code removed to make it easier to see most updated code
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#3</link>
<pubDate>Wed, 11 Jul 2018 16:05:34 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#3</guid>
<category>VoiceBot</category>
<description><![CDATA[You could try running it on a timer and use the BFS.ScriptSettings.xxx namespace to save the file size between checks possibly?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You could try running it on a timer and use the BFS.ScriptSettings.xxx namespace to save the file size between checks possibly?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#2</link>
<pubDate>Tue, 10 Jul 2018 17:59:21 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8#2</guid>
<category>VoiceBot</category>
<description><![CDATA[Sorry all the solution was so simple I missed it
from f in directory.GetFiles("Journal.*.log")
still working on the event handle so the macro only runs when a change is made to the file]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Sorry all the solution was so simple I missed it <br/>
<br/>
from f in directory.GetFiles("Journal.*.log")<br/>
<br/>
still working on the event handle so the macro only runs when a change is made to the file
</div>
]]></content:encoded>
</item>
<item>
<title>Trying to write elite danerous journal reader</title>
<link>https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8</link>
<pubDate>Tue, 10 Jul 2018 17:16:49 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.voicebot.net/Discussions/View/trying-to-write-elite-danerous-journal-reader/?ID=5af2aeb4-29e1-41f1-a199-0854f37048e8</guid>
<category>VoiceBot</category>
<description><![CDATA[I am trying to write a elite dangerous journal reader (a json file) to pickup particular events and I am getting closer but could use some help.
I need to find the last modified file beginning with the name "Journal" currently I am finding only the last file modified " status.json"    the file I...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I am trying to write a elite dangerous journal reader (a json file) to pickup particular events and I am getting closer but could use some help.<br/>
<br/>
I need to find the last modified file beginning with the name "Journal" currently I am finding only the last file modified " status.json"    the file I want looks like " Journal.180208153951.01.log"<br/>
<br/>
the data looks just like this <br/>
{ "timestamp":"2018-07-10T01:58:11Z", "event":"Status", "Flags":0 } <br/>
<br/>
with the following code I am able to read the last line of the  file and branch on finding the string  "event":"Status",<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019f7f896958703ca9c371b364fe1f10" class="ClipboardCopyControl"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019f7f896958703ca9c371b364fe1f10Js'); return false;"><img src="https://www.voicebot.net/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019f7f896958703ca9c371b364fe1f10Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Drawing;
using System.IO;
using System.Linq;

public static class VoiceBotScript
{
    public static void Run(IntPtr windowHandle)
    {  
              // find the last modified file  
         var directory = new DirectoryInfo("C:\\Users\\tothe\\Saved Games\\Frontier Developments\\Elite Dangerous");
            var myFile = (from f in directory.GetFiles()
                          orderby f.LastWriteTime descending
                          select f).First();
            try
            {
                string st = File.ReadAllLines("C:\\Users\\tothe\\Saved Games\\Frontier Developments\\Elite Dangerous\\" + myFile).Last();
                //string st = File.ReadAllText("C:\\Users\\tothe\\Saved Games\\Frontier Developments\\Elite Dangerous\\Journal.180208153951.01.log");

                Char delimiter = ',';
                String[] substrings = st.Split(delimiter);
               
                if( substrings[1] == " \"event\":\"Status\"")
                {
                    BFS.Speech.TextToSpeech("yes I got it");
                    
                }
            }
            catch (Exception e)
            {
               BFS.Speech.TextToSpeech("could not find the file");
            
            
            }
    }
}</pre><textarea id="code019f7f896958703ca9c371b364fe1f10" name="code019f7f896958703ca9c371b364fe1f10" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>