Author Topic: writing a value to va's event log  (Read 1750 times)

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
writing a value to va's event log
« on: April 16, 2020, 08:36:36 PM »
I am trying to retrieve a number from the Elite dangerous journal and want to have written to VA event log. I am retrieving the number from a notepad file that gets updated.
I have figured out how to access the info but can't figure out how to retrieve it so VA will write it to the log
The number can be between 0 and 730

Set text [garrison-cargo] to [Saved Value] (save value to profile)
Set integer [garrison-cargo] value to [Saved Value]
Write 'garrison-cargo' to log

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: writing a value to va's event log
« Reply #1 on: April 16, 2020, 08:40:26 PM »
Wrap the variable name in the token appropriate for the variable type you're retrieving the value of.

Those tokens are listed in VoiceAttackHelp.pdf v1.8.5+ pages 149 to 151.

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: writing a value to va's event log
« Reply #2 on: April 16, 2020, 08:53:11 PM »
did you mean 1.8.4+?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: writing a value to va's event log
« Reply #3 on: April 16, 2020, 08:57:16 PM »
If you're not running the beta, yes. Page numbers are identical in both.

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: writing a value to va's event log
« Reply #4 on: April 17, 2020, 01:04:54 PM »
Ok I am just confusing my self.
I was finally able to get the command to write to log, but all I get is not set.
Have tried a lot of different variations of the commands but not getting anywhere.
I need some suggestions please.
The file I am taking the information from only has a number in it from 0 to 730.
I need to have was ever number is there written to the log

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: writing a value to va's event log
« Reply #5 on: April 17, 2020, 01:09:03 PM »
The token you're using does not match the variable type you're setting a value to, and the variable name within the token does not match that of the variable you're setting a value to.

Try
Code: [Select]
Set text [garrison-cargo] to [C:\Users\PcGamer\Downloads\Autohotkey\Cargo.log]
Write [Blue] '{TXT:garrison-cargo}' to log

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: writing a value to va's event log
« Reply #6 on: April 17, 2020, 01:54:27 PM »
Ok I give up I don't know enough about tokens and their use, and I might not understand the terms that are being used.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: writing a value to va's event log
« Reply #7 on: April 17, 2020, 01:57:48 PM »
Did you try the modifications I suggested?

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: writing a value to va's event log
« Reply #8 on: April 17, 2020, 02:09:08 PM »
well last couple of times I open the forum it was not listed all I saw was the text. Clearly I am having a problem viewing somethings. Not sure what is going on but either way thanks I will try it.

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: writing a value to va's event log
« Reply #9 on: April 17, 2020, 02:22:00 PM »
Yes that worked Thank you.
Do you have an  simple example of how to use the token I was trying to use.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: writing a value to va's event log
« Reply #10 on: April 17, 2020, 02:28:20 PM »
Which token? "{INT:}"?

As mentioned, you need to match the token to the variable type you're using.

The documentation for that token states:
Quote from: VoiceAttackHelp.pdf v1.8.4+ page 150
{INT:variableName} - The numeric value stored in an integer variable will be retrieved.

You're setting a text variable, so you need to use the token for that type:
Quote from: VoiceAttackHelp.pdf v1.8.4+ page 151
{TXT:variableName} - The text value stored in a text variable will be retrieved.