Author Topic: Retrieve/Store Profile saved variables from C#  (Read 2202 times)

Uriei

  • Newbie
  • *
  • Posts: 2
Retrieve/Store Profile saved variables from C#
« on: November 17, 2018, 11:27:02 AM »
In short, I'm tinkering with some C# inline function and I'm trying to find if there is a way to Store and Retrieve variables that are stored in the profile, but I haven't been able to find anything either in VoiceAttack documentation or here on the forums about the equivalent of "Retrieve saved value/Save value to profile" from an inline function.

Am I just missing something or it's just not possible?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Retrieve/Store Profile saved variables from C#
« Reply #1 on: November 17, 2018, 03:57:14 PM »
There isn't currently a function to do that through the proxy, unfortunately.  I will add it to the todo list, tho.

As a workaround, you'll want to create a command to retrieve the value first, and then access the value.

Sorry about that... good idea, for sure!

Uriei

  • Newbie
  • *
  • Posts: 2
Re: Retrieve/Store Profile saved variables from C#
« Reply #2 on: November 18, 2018, 02:42:24 AM »
Ok, no problem, for now I'm using a loop to run the C# and it returns a variable for the Retrieve store value one to work, because I need it to work with a variable number of variables :D

I can't wait for being able to do it from inside the C# function, thank you very much ;)

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: Retrieve/Store Profile saved variables from C#
« Reply #3 on: November 18, 2018, 04:37:31 AM »
Can I add that there maybe times when contents of variables should not be shown. Personally I store sensitive things at times and I wouldn't want a user to retrieve them. Not so much in profile saved vars but I thought I'd make the point :)
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

alterNERDtive

  • Jr. Member
  • **
  • Posts: 52
Re: Retrieve/Store Profile saved variables from C#
« Reply #4 on: December 03, 2020, 09:33:53 AM »
As a workaround, you'll want to create a command to retrieve the value first, and then access the value.

I’m currently doing that, but let’s just say … it’s a little bit spammy in the log :)

Instead of asking for a way to hide the line on plugin-triggered commands from the log, can I instead ask to move this one up a little further on the todo list?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Retrieve/Store Profile saved variables from C#
« Reply #5 on: December 03, 2020, 11:19:37 AM »
In the mean time, the "Ignore an Unrecognized Word or Phrase" action can already be used to remove the log entry (that is all that action does).