Author Topic: Create a new Command "When I don't" do something.  (Read 1262 times)

tgsnet

  • Newbie
  • *
  • Posts: 8
Create a new Command "When I don't" do something.
« on: May 28, 2021, 11:29:13 AM »
I'm looking to have Voice Attack trigger a command when I don't do something.

The command example that I need is:
 
If commands unrecognized for (variable amount of time=30mins - 1 hour) trigger this command

reason for "commands unrecognized"? because this would mean I haven't interacted/triggered commands in Voice Attack in that certain amount of time and I want Voice Attack to prompt me to interact with it.

Is this possible? Or are there some creative ways to make it possible?

Mamy la Puce

  • Newbie
  • *
  • Posts: 19
Re: Create a new Command "When I don't" do something.
« Reply #1 on: May 28, 2021, 03:20:02 PM »
Hi there ^^

I'm new in VA, but If I were in your case, I think I would do like this :

- at the end of each of my commands, I would add : 'Execute Command X'

Command X =>
Pause 2700 sec (45 min)
"Then all the steps of the command you want to execute"

But maybe there’s even easier to do...

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4758
  • RTFM
Re: Create a new Command "When I don't" do something.
« Reply #2 on: May 28, 2021, 06:48:13 PM »
Is this possible? Or are there some creative ways to make it possible?
You could have a command running in the background that checks the output of the "{CMDLASTUSEREXEC}" token, and if it exceeds a certain duration, perform your prompt.

There is no direct native method to distinguish between commands from different input methods (E.G. spoken, keypress, button press, etc...) in this context, however.
« Last Edit: May 28, 2021, 11:26:25 PM by Pfeil »

Mamy la Puce

  • Newbie
  • *
  • Posts: 19
Re: Create a new Command "When I don't" do something.
« Reply #3 on: May 29, 2021, 05:26:39 AM »
Nice tip, good to know, i need to learn more about tokens, I don’t know them well enough when it’s very useful  :)

tgsnet

  • Newbie
  • *
  • Posts: 8
Re: Create a new Command "When I don't" do something.
« Reply #4 on: May 29, 2021, 09:56:44 AM »
Is this possible? Or are there some creative ways to make it possible?
You could have a command running in the background that checks the output of the "{CMDLASTUSEREXEC}" token, and if it exceeds a certain duration, perform your prompt.

There is no direct native method to distinguish between commands from different input methods (E.G. spoken, keypress, button press, etc...) in this context, however.

Hi Pfeil,

Thank you for answer. I'll look in the VA Help document to learn more about the tokens.

But if you have time available could you provide us with a working example of this in action? I'm still trying to get use to how things work in VA(most of which is pretty simplified which is awesome) as every program has its certain way wanting things put together in a specific manner.

tgsnet

  • Newbie
  • *
  • Posts: 8
Re: Create a new Command "When I don't" do something.
« Reply #5 on: May 29, 2021, 10:19:30 AM »
omg those tokens are awesome, there is so so many useful ones.

How do I go about running a command in the background to check on these tokens?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4758
  • RTFM
Re: Create a new Command "When I don't" do something.
« Reply #6 on: May 29, 2021, 02:51:12 PM »
Assuming you're referring to running the command automatically, you can use the "Execute a command each time this profile is loaded" option.

Note that that option only applies when the profile it's configured in is loaded as the active profile, not when it's included into another profile (either directly or globally)

tgsnet

  • Newbie
  • *
  • Posts: 8
Re: Create a new Command "When I don't" do something.
« Reply #7 on: May 29, 2021, 06:12:43 PM »
Assuming you're referring to running the command automatically, you can use the "Execute a command each time this profile is loaded" option.

Note that that option only applies when the profile it's configured in is loaded as the active profile, not when it's included into another profile (either directly or globally)

"Execute a command each time this profile is loaded" So that means it would only run once correct? Or will it constantly check while the profile is loaded?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4758
  • RTFM
Re: Create a new Command "When I don't" do something.
« Reply #8 on: May 29, 2021, 06:16:55 PM »
That option would start the command once, when the profile is loaded. You need to configure the command to perform the check periodically (E.G. using the "Repeating" option, or a loop action).

Do note that the command will be stopped, as any other commands would, if you stop all commands (E.G. using the button on the main window, a "Stop All Commands Hotkey" hotkey, the "Make VoiceAttack Stop Processing All Commands" action in a command, etc...).

tgsnet

  • Newbie
  • *
  • Posts: 8
Re: Create a new Command "When I don't" do something.
« Reply #9 on: May 29, 2021, 06:54:09 PM »
Thank you again for your time and support!