Author Topic: VAExtensions, a general purpose plugin  (Read 78812 times)

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
VAExtensions, a general purpose plugin
« on: May 04, 2016, 06:44:39 AM »
Hello brand new forum!

On the link below you can find a utility/general purpose plugin for dealing with text files, XML, RSS feed and so on, that I've being thinkering with for quite some time; you may remember my old 'VATextReader/VAMath/etc." plugins posted a while ago in the Google Group... this is a collection and polish of that same stuff, with some new features added

Documentation is still absent, but you may refer to the sample profiles and the old documentation found in the above plugins... feel free to ask for any help

Source and binaries here (follow the 'Releases' link on top for the zipped downloads): https://github.com/Antaniserse/VAExtensions
 
Edit: Version 2.0 is out, with support for the new VoiceAttack plugin interface... requires VoiceAttack 1.6 or later
« Last Edit: July 10, 2017, 06:49:31 AM by Antaniserse »
"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #1 on: September 01, 2016, 10:01:02 PM »
So, I know this an old thread, but I download this plugin to read the Elite Dangerous netlog and I'm having an issue.

It seems that the netlog is inaccessible while ED is running.  I say "seems", because, for some reason MS Access can open the file, read it, copy it (I never actually edit the original file of course). I even tried changing the extension while ED was running, expecting to get the "this file is open in another program...", but I could actually do it.  But this plugin gives me an error in VA saying "Error loading file content".  As soon I shut down ED, the plugin reads it just fine.

Any special settings or something I'm doing wrong?

I would really like to get this going with the netlog, as I've constructed some regex's that pull out a couple of entries that I'm really interested getting into VA for processing.

Thanx

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
Re: VAExtensions, a general purpose plugin
« Reply #2 on: September 02, 2016, 03:30:21 AM »
Any special settings or something I'm doing wrong?
I don't think there's anything wrong in your profile, it looks like a locked file issue of some sort, from what you have described, especially due to the fact that without ED running the file becomes readable again.

Can you remind me the exact name and path of the ED netlog file you are trying to access? I have the game and i can try and reproduce the issue here... the pluging should only try for 'open' access when reading files, but it might have slipped somewhere
"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

cmdrmcdonald

  • Guest
Re: VAExtensions, a general purpose plugin
« Reply #3 on: September 02, 2016, 04:17:02 AM »
You might want to take a look at EDDI (https://forums.frontier.co.uk/showthread.php/226649-EDDI-A(nother)-Voice-Attack-Plugin) which probably does what you want it to do.

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #4 on: September 02, 2016, 04:15:24 PM »
Any special settings or something I'm doing wrong?
I don't think there's anything wrong in your profile, it looks like a locked file issue of some sort, from what you have described, especially due to the fact that without ED running the file becomes readable again.

Can you remind me the exact name and path of the ED netlog file you are trying to access? I have the game and i can try and reproduce the issue here... the pluging should only try for 'open' access when reading files, but it might have slipped somewhere

Umm...I think the path is 'C:\Program Files (x86)\Steam\steamapps\common\Elite Dangerous\Products\elite-dangerous-64\logs'...or something really close to that.

Yeah, I thought that reading a 'locked' file shouldn't be a problem either. But I am using a regex on it (just to read the last line, no editing what-so-ever), so I'm not sure if that makes a difference.

Thanx for looking into it.  I would really love to see if this will work. :)
« Last Edit: September 02, 2016, 05:43:34 PM by Technomancer »

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #5 on: September 02, 2016, 04:17:54 PM »
You might want to take a look at EDDI (https://forums.frontier.co.uk/showthread.php/226649-EDDI-A(nother)-Voice-Attack-Plugin) which probably does what you want it to do.

Thanx for the suggestion.  I am already using EDDI.  I really like it and I'm incorporating many of the variables into my own profile to track things and get feedback.

However, what I'm looking to get from the netlog file is the 'interdictions', which I see are logged, but EDDI doesn't mention them.

Is there a way to fish those out with EDDI??

Thanx

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
Re: VAExtensions, a general purpose plugin
« Reply #6 on: September 05, 2016, 07:02:41 AM »
The latest plugin release should have this fixed; now text files should be accessible for reading even when locked

Download from the usual website, link under my avatar
"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

cmdrmcdonald

  • Guest
Re: VAExtensions, a general purpose plugin
« Reply #7 on: September 05, 2016, 12:10:33 PM »
You might want to take a look at EDDI (https://forums.frontier.co.uk/showthread.php/226649-EDDI-A(nother)-Voice-Attack-Plugin) which probably does what you want it to do.

Thanx for the suggestion.  I am already using EDDI.  I really like it and I'm incorporating many of the variables into my own profile to track things and get feedback.

However, what I'm looking to get from the netlog file is the 'interdictions', which I see are logged, but EDDI doesn't mention them.

Is there a way to fish those out with EDDI??

Thanx

I'm not aware of interdictions being shown in the netlog in a way that makes them possible to use in an interesting fashion.  The next release of Elite (2.2.) is going to have a journal that will have this information (and a lot more besides) made available in a sensible fashion and EDDI will support the journal events on its release.

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #8 on: September 05, 2016, 07:04:25 PM »
The latest plugin release should have this fixed; now text files should be accessible for reading even when locked

Download from the usual website, link under my avatar

Thanks for helping out with this.  Unfortunately, my command (which works, except for the locked file issue) is now returning "Not set" to the VA log instead of the log entry that I fish out with a regex.  :(

I did have to re-select the new plugin in my command and I made sure to re-populate the "Plugin Context" box to "read_file" and "Text Variables" box to "VAReaderFile;VAReaderRegEx".

When I put the old plugin back in, my command works again.

Maybe my regex isn't working with this update??

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
Re: VAExtensions, a general purpose plugin
« Reply #9 on: September 06, 2016, 12:30:36 AM »
Thanks for helping out with this.  Unfortunately, my command (which works, except for the locked file issue) is now returning "Not set" to the VA log instead of the log entry that I fish out with a regex.  :(

I did have to re-select the new plugin in my command and I made sure to re-populate the "Plugin Context" box to "read_file" and "Text Variables" box to "VAReaderFile;VAReaderRegEx".

When I put the old plugin back in, my command works again.

Maybe my regex isn't working with this update??

There shoudn't be any difference in that regard, I just changed the way the stream is opened to load the file in memory, the rest is the same... i tried with a very simple RegEx to fetch the system name from the netlog, with the ED client running, and it worked

You are getting 'Not Set' evwen with the client closed now?

If you wanna try and upload your specific profile, I can make a test focused at that...
"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #10 on: September 06, 2016, 02:59:22 AM »
Thank you so much for the quick responses.

I got it sorted out.  I was using v1.07 and v1.4 has a different text variable for the returning result. :P  I copied the text variables to my profile and it seems to be working great.  ED is up and running and your plugin is reading the log file. :D

It's kinda late and I didn't check out if the command actually fishes out the interdiction entry while the game is running, but at least the plugin is able to read the file while it's open now.
« Last Edit: September 06, 2016, 03:03:56 AM by Technomancer »

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #11 on: September 06, 2016, 09:24:52 AM »
I'm not aware of interdictions being shown in the netlog in a way that makes them possible to use in an interesting fashion.  The next release of Elite (2.2.) is going to have a journal that will have this information (and a lot more besides) made available in a sensible fashion and EDDI will support the journal events on its release.

I'm just trying to fish out the line that says "interdictor" so that I can run my "Interdiction routine" of submitting, assigning pips, boosting and low/high waking or deploying weapons to fight.  Of course, if my theory works and the interdiction is detected in a timely manner (I'm not sure how quickly the log is updated), I can also have some dialog to spice things up. :)

EDDI certainly would be better for an "all-in-one" solution. 

Also, I ran into an old post a couple of weeks ago (by jgm I believe) where he put up the code for EDDI for download.  I can't, for the life of me, find that post now.  Do you know what I'm talking about?  I'd like to get it and check it out.

Thanx


cmdrmcdonald

  • Guest
Re: VAExtensions, a general purpose plugin
« Reply #12 on: September 06, 2016, 12:16:00 PM »
I'm not aware of interdictions being shown in the netlog in a way that makes them possible to use in an interesting fashion.  The next release of Elite (2.2.) is going to have a journal that will have this information (and a lot more besides) made available in a sensible fashion and EDDI will support the journal events on its release.

I'm just trying to fish out the line that says "interdictor" so that I can run my "Interdiction routine" of submitting, assigning pips, boosting and low/high waking or deploying weapons to fight.  Of course, if my theory works and the interdiction is detected in a timely manner (I'm not sure how quickly the log is updated), I can also have some dialog to spice things up. :)

EDDI certainly would be better for an "all-in-one" solution. 

Also, I ran into an old post a couple of weeks ago (by jgm I believe) where he put up the code for EDDI for download.  I can't, for the life of me, find that post now.  Do you know what I'm talking about?  I'd like to get it and check it out.

Thanx

EDDI won't support the interdiction items until 2.2.

You can find EDDI's source at https://github.com/cmdrmcdonald/EliteDangerousDataProvider/

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #13 on: September 14, 2016, 12:55:26 AM »
Quick question for Antaniserse:

Can the VxRegEx variable be populated with a token? i.e.: ((?<={TXT:VxResult})[^\]]+)  <---That will populate as intended when sent to the VA log, but I'm not sure if the plugin is resolving the token or if it's taking it literally...?
EDIT: got it working with a token. I had an extra bracket in the regex screwing things up. :P

Plugin is working great...unfortunately, the ED log is not very "reliable".

It throws out entries on time, late, whenever...  ???

It throws out interdiction entries that get picked up by my regex, then no interdiction happens.  It throws out Docked AND Undocked almost simultaneously, even when an Undock has not happened yet.  It's all over the place.

I'll keep hammering at it.

« Last Edit: September 14, 2016, 02:59:46 AM by Technomancer »

cmdrmcdonald

  • Guest
Re: VAExtensions, a general purpose plugin
« Reply #14 on: September 14, 2016, 06:14:51 AM »
Quick question for Antaniserse:

Can the VxRegEx variable be populated with a token? i.e.: ((?<={TXT:VxResult})[^\]]+)  <---That will populate as intended when sent to the VA log, but I'm not sure if the plugin is resolving the token or if it's taking it literally...?
EDIT: got it working with a token. I had an extra bracket in the regex screwing things up. :P

Plugin is working great...unfortunately, the ED log is not very "reliable".

It throws out entries on time, late, whenever...  ???

It throws out interdiction entries that get picked up by my regex, then no interdiction happens.  It throws out Docked AND Undocked almost simultaneously, even when an Undock has not happened yet.  It's all over the place.

I'll keep hammering at it.

Bear in mind that the only reliable events in the netlog are entering/leaving supercruise, and jumping systems.  This is because the other items in the log are for all ships and not just your own.

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #15 on: September 15, 2016, 01:43:40 AM »
Bear in mind that the only reliable events in the netlog are entering/leaving supercruise, and jumping systems.  This is because the other items in the log are for all ships and not just your own.

Seriously...?  Even in solo??

Not that I don't believe you.  You obviously have way more experience here, but why in the world does the log spit out entries for anyone but the actual player (in solo)???

Whatever.  Let's see what the Commander's Log has to offer.  Seems pretty comprehensive.

cmdrmcdonald

  • Guest
Re: VAExtensions, a general purpose plugin
« Reply #16 on: September 15, 2016, 07:18:49 AM »
Bear in mind that the only reliable events in the netlog are entering/leaving supercruise, and jumping systems.  This is because the other items in the log are for all ships and not just your own.

Seriously...?  Even in solo??

Not that I don't believe you.  You obviously have way more experience here, but why in the world does the log spit out entries for anyone but the actual player (in solo)???

Whatever.  Let's see what the Commander's Log has to offer.  Seems pretty comprehensive.

Yeah 'fraid so.  The other ships are both PCs and NPCs, so even in solo you don't avoid the issue. It's because the netlog has a lot of state tracking information in it but wasn't designed to be used by players.

And yes, the journal should be a lot more useful.  We'll have to wait for the beta to see how close to the document it really comes, of course.

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #17 on: September 28, 2016, 09:11:31 AM »
OK, well, after some regex juggling, I got this working about 90% reliable.  And the only caveat is the log not being updated "immediately" after every action.

Hence, about 90% of the time I dock, almost instantly upon touch down, the VA commands picks up the log entry and notifies me, "Dock successful, contacting station computers..." and runs the EDDI dock event.  Same with undocking (I wrote a little VA routine for undocking which "unlocks" actions that shouldn't/can't take place while docked, like deploying weapons, supercruise, chaff, heat sinks, messing with the landing gear, etc.; that way they stay in sync with the game).

What happens the other, roughly, 10% of the time is that I dock and "nothing happens".  So I'll go to the Mission Boards and browse around a bit. Then after a little while, apparently, the log updates and I get the "Dock successful..." notification and everything runs.  Same with undocking.

I have made a "manual" command version of Docking and Undocking, in case of these failures, so I'm covered.  Just wish the client was consistent in updating the log quickly. :P

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Re: VAExtensions, a general purpose plugin
« Reply #18 on: October 06, 2016, 07:38:16 PM »
Hello brand new forum!

On the link below you can find a utility/general purpose plugin for dealing with text files, XML, RSS feed and so on, that I've being thinkering with for quite some time; you may remember my old 'VATextReader/VAMath/etc." plugins posted a while ago in the Google Group... this is a collection and polish of that same stuff, with some new features added

Documentation is still absent, but you may refer to the sample profiles and the old documentation found in the above plugins... feel free to ask for any help

Source and binaries here: https://github.com/Antaniserse/VAExtensions

when trying to build this project, I get an error about NuGet package not being installed? I'm very new to Visual Studio, but I did a little research  and downloaded the NuGet Package Explorer, and also downloaded System.Data.SQLite.Core through the package Explorer. Unfortunately, I'm still getting the same error message, which is:

Severity   Code   Description   Project   File   Line   Suppression State
Error      This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\System.Data.SQLite.Core.1.0.102.0\build\net40\System.Data.SQLite.Core.targets.   VAExtensions   C:\Users\Jerry Farris\Documents\Visual Studio 2015\Projects\VAExtensions\VAExtensions.vbproj   199

What am I doing wrong?
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
Re: VAExtensions, a general purpose plugin
« Reply #19 on: October 07, 2016, 03:53:20 AM »
What am I doing wrong?
More likely than not, it's me that is doing something wrong; I'm still not entirely sure what is the best behaviour concerning GitHub and NuGet packages  ::)

Anyway, if you have downloaded the files all you should need to do is add the library in the project references (Property->references).
The Package Manager integrated with Visual Studio (not entirely sure if the 'NuGet Package Explorer' is the same thing, you shouldn't have to download that separately...) should have already done that for you, but maybe try removing and re-adding manually.

On a different, clean machine with VS2013 and the default NuGet tools, I didn't have to do anything at all: downloaded the ZIP from GitHut, opened the solution and upon first building I saw this little popup


everything missing was downloaded and built succesfully
« Last Edit: October 07, 2016, 03:58:37 AM by Antaniserse »
"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Re: VAExtensions, a general purpose plugin
« Reply #20 on: October 07, 2016, 10:46:08 AM »
Anyway, if you have downloaded the files all you should need to do is add the library in the project references (Property->references).
The Package Manager integrated with Visual Studio (not entirely sure if the 'NuGet Package Explorer' is the same thing, you shouldn't have to download that separately...) should have already done that for you, but maybe try removing and re-adding manually.
well, I'll keep messing with it. In the meantime,  I was finally able to connect to my SQL server database from within my own project. :-)

I just love programming. :-)
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
Re: VAExtensions, a general purpose plugin
« Reply #21 on: November 23, 2016, 08:23:20 AM »
Version 2.0 is out, with support for the new VoiceAttack plugin interface... requires VoiceAttack 1.6 or later
"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: VAExtensions, a general purpose plugin
« Reply #22 on: November 23, 2016, 09:03:41 AM »
Awesome :)

Frici

  • Newbie
  • *
  • Posts: 15
Re: VAExtensions, a general purpose plugin
« Reply #23 on: November 24, 2016, 01:52:13 PM »
Version 2.0 is out, with support for the new VoiceAttack plugin interface... requires VoiceAttack 1.6 or later

Great! thanks for your hard work :D

Technomancer

  • Jr. Member
  • **
  • Posts: 98
  • I have a bad feeling about this...
Re: VAExtensions, a general purpose plugin
« Reply #24 on: February 16, 2017, 10:06:34 AM »
Late to the party...haven't played ED in a while, but...

SCHWEEET!!!

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: VAExtensions, a general purpose plugin
« Reply #25 on: February 27, 2017, 11:33:11 AM »
This sounds super cool and might be a great way to test the water with the plugins. I'll definitely need to check this out!!

Thanks for the great work!  :D

Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: VAExtensions, a general purpose plugin
« Reply #26 on: March 12, 2017, 04:58:59 PM »
I am trying to come up with a command that reads a string from a text file and paste it into Elite Dangerous text entry box. And then the next time it does the next line. So on and so forth.

Currently I am having to use 2 commands (one to copy) and another to paste, and I was wondering if there was a method to do this using this extension....

Mr Talkalot

  • Newbie
  • *
  • Posts: 12
Re: VAExtensions, a general purpose plugin
« Reply #27 on: March 28, 2017, 01:02:28 AM »
Would really like some basic information on how to install and use this.

I have some commands in a xlsx format that I would like to convert to a VA Profile,
that I can add to my current profile for ED.

Any other help about how to use txt, html, and other formats with VA would be greatly appreciated
by this non programmer.

Antaniserse

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 87
    • My VA plugins
Re: VAExtensions, a general purpose plugin
« Reply #28 on: March 28, 2017, 04:01:32 AM »
Would really like some basic information on how to install and use this.

I have some commands in a xlsx format that I would like to convert to a VA Profile,
that I can add to my current profile for ED.

Any other help about how to use txt, html, and other formats with VA would be greatly appreciated
by this non programmer.

Installation is pretty straightforward: take the folder (not the single files) inside the zipped archive, and extract inside the \Apps directory in your main VoiceAttack folder, so that you end up with a \Apps\VAExtensions\<some files> structure

After that, just launch VoiceAttack and, if you have plugin enabled in your options, you should see a confirmation message in the log that VAExtensions has been loaded... import the sample profiles included to have a look at the various functions

Note, however, that all the TXT/XML/CVS/etc. reading capabilities of the plugin are not meant to directly import new commands from those files into your profiles, but rather to use the data inside to feed your various actions with whatever extra info you might need from external files

"I am not perfect and neither was my career. In the end tennis is like life, messy."
Marat Safin

rpoteat

  • Guest
Re: VAExtensions, a general purpose plugin
« Reply #29 on: March 28, 2017, 09:51:08 PM »
Note, however, that all the TXT/XML/CVS/etc. reading capabilities of the plugin are not meant to directly import new commands from those files into your profiles, but rather to use the data inside to feed your various actions with whatever extra info you might need from external files

 ???
This is the part I find most confusing and would want a little more guidance and instruction on..,,,,,