Author Topic: VA.Command.SetSessionEnabled = 'UNABLE TO ACCESS COMMAND. COMMAND NOT AVAILABLE'  (Read 1554 times)

Starblue7

  • Full Member
  • ***
  • Posts: 131
I have two commands within the same profile.

The first command is running and stays open doing other stuff.
Within the first command there's an INLINE function that should disable one of the other commands in the profile and I'm getting the above error (Subject)

I'm using the suggested INLINE routine per code below:

Code: [Select]
public class VAInline
{
public void main()
{
VA.Command.SetSessionEnabled("[TEST] TEST COMMAND -ONE-", false);
}
}

The [TEST] TEST COMMAND -ONE-  command's  'Always execute this command' is unchecked (in case this matters).

As well the command name (which I presume is defined by the 'When I Say' command field is also Checked (just in case)), even though I don't use any verbal trigger for this command.

Is it a requirement that the SetSessionEnabled take a STRING variable and won't accept text in quotes, as per above?  Doesn't seem this should matter.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Square brackets are used to define dynamic command sections, and are therefore removed when command phrases are generated.

Try "TEST TEST COMMAND -ONE-" instead.

Starblue7

  • Full Member
  • ***
  • Posts: 131
Yup.  Just figured that out, thanks!    :)

Now if there was only an easy way to totally silence a command's activities that Voice Attack itself generates within the event log.  i.e.  When I click the left mouse button and it's tied to a command, I don't need to see all the time:

['GREEN'] MOUSE : 'TEST TEST COMMAND'
['RED'] Command 'TEST TEST COMMAND' is currently disabled for this session and was not executed

haha  Don't need to see this in the logs on every mouse press.   ::)

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Yup.  Just figured that out, thanks!    :)

Now if there was only an easy way to totally silence a command's activities that Voice Attack itself generates within the event log.  i.e.  When I click the left mouse button and it's tied to a command, I don't need to see all the time:

['GREEN'] MOUSE : 'TEST TEST COMMAND'
['RED'] Command 'TEST TEST COMMAND' is currently disabled for this session and was not executed

haha  Don't need to see this in the logs on every mouse press.   ::)

Just make the top-most action in your command action list "Ignore an Unrecognized Word or Phrase" -- aka "Do nothing"

Starblue7

  • Full Member
  • ***
  • Posts: 131
That may likely do something for the 'Spoken' triggers of a command, but when pressing the left mouse button key with that line in the command didn't remove everything VA may report on.  I.E.  I've got the command disabled, but still if I click on the left mouse button, VA will tell me it's disabled every time I click it.
so..  It's really only a partial thing I guess.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
The screenshot I shared was a command with the 'When I say' phrase disabled (unchecked), and the middle mouse button as enabled (checked), and with the option to not pass-through and invoke on release - those mouse options DO NOT matter.

It fired every time for me, and with that action as the top-most action, the actions below it printed out the 'command executed' write-to-event-log action every time I pressed (and released) my middle mouse button.



Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
The "Command '' is currently disabled for this session and was not executed." message is indeed unaffected by the "Ignore an Unrecognized Word or Phrase" action.

Given that that message is intended to notify the user as to why the command they're attempting to execute is not executing as they might expect, that may be intentional.

Starblue7

  • Full Member
  • ***
  • Posts: 131
Yeah, but would like the option to turn that off for a particular command as well.
I suppose there COULD be some type of 'POWER USER' section in VA that could be included for those who want to go outside of the normal operating scope in order to have a bit more custom control of these things, without perhaps, making a plug-in to do it. (even if it were possible).

Anyways, in my case, I'll try to find a better way around this, and indeed, that will likely be a plug-in.
But would really be nice not to have to rely on a plug-in for an alternative.

Anyways.  Thanks  ;)