Author Topic: Unable to retrieve saved variables after restarting VoiceAttack  (Read 3224 times)

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Unable to retrieve saved variables after restarting VoiceAttack
« on: February 22, 2017, 12:00:58 PM »
Today I noticed that all the variables that I want to save to the profile (checked the "save value to profile" option when defining the variables) actually do not persist when I close & reopen VoiceAttack and then try to redefine the variable with the "retrieve saved value" option. 

So if I perform the following (Command "test"):

Code: [Select]
Set Text [squadmate1] to 'ashley' (save value to profile)
Set Text [squadmate2] to 'james' (save value to profile)
Set Text [{EXP:'squad'+'mate'+3}] to 'javik' (save value to profile)
Write '[Blue] {TXT:squadmate1} {TXT:squadmate2} {TXT:squadmate3}' to log
Set Text [squadmate1] to [Not Set]
Set Text [squadmate1] to [Saved Value] (save value to profile)
Write '[Blue] {TXT:squadmate1}' to log

..the output is (new log entries at the bottom):

Quote
ashley james javik
ashley

So the variable declaration, clearing to "Not set" and retrieval of the saved value works so far.

If I then run the following (Command "test2"):

Code: [Select]
Set Text [squadmate1] to [Saved Value] (save value to profile)
Set Text [squadmate2] to [Saved Value] (save value to profile)
Set Text [squadmate3] to [Saved Value] (save value to profile)
Write '[Blue] {TXT:squadmate1} {TXT:squadmate2} {TXT:squadmate3}' to log

then the output is the following:

Quote
ashley james javik

Again, everything's good so far.

However If I now close and restart VoiceAttack and then immediately run the "test2" command I get the following output:

Quote
Not set Not set Not set

As you can see I cannot retrieve the saved squadmate text values after restarting VoiceAttack.

From the Help Document pg. 59:
Quote
To save the text variable value with the current profile, check the, 'Save value to profile' box. The value will be available even if the VoiceAttack application is closed and opened again. This is a simple way to save your text value variable to disk.

I should note that I've installed VoiceAttack on a flash drive and I run it from there, but I would think that this shouldn't impact the functionality to save variables to a profile.

Any thoughts about why I cannot get the variables to reset to their saved values after restarting VoiceAttack? Is there something wrong with my syntax?

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Unable to retrieve saved variables after restarting VoiceAttack
« Reply #1 on: February 22, 2017, 01:58:25 PM »
I also tried all of the above on a fresh PC installation (i.e., not installed on flash drive) of VoiceAttack v1.6.1, and the problem persists - saving and retrieving variables to/from the profile does not work (or I'm missing something here).

Thoughts?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2824
Re: Unable to retrieve saved variables after restarting VoiceAttack
« Reply #2 on: February 22, 2017, 02:21:01 PM »
Without diving into this (away from my computer), are you right-click executing these or are you issuing commands to make these work?  There may be an issue with right-click executing that does not present itself in normal operation.


Also, you may want to just do a sanity check (shooting from the hip... still away from pc):

Command 1:
Set myVariable to 'abc' (save value to profile)

Command 2:
Set myVariable to [SAVED VALUE]
Write {TXT:myVariable} to log

Run command 1, then run command 2... should show, 'abc' in the log window

Close VA, Open VA.  Run command 2.  Should show, 'abc' in the log window.

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Unable to retrieve saved variables after restarting VoiceAttack
« Reply #3 on: February 22, 2017, 07:04:19 PM »
So I tried exactly as you indicated and it DOES work when the commands are voice activated (the saved value gets retrieved) and DOES NOT work when the commands are right-click executed.

An interesting behavior, so thanks for pointing that out. I was doing the right-click just for bug checking and testing purposes.