Author Topic: some suggestions & issues  (Read 4535 times)

Squeeze

  • Newbie
  • *
  • Posts: 25
some suggestions & issues
« on: May 24, 2021, 02:21:45 PM »
Hello there, Voice Attack is near to be perfect but i still miss some features:

- i would like to have the possibility to enable/disable commands. It would make scripting things so much easier.
  i already asked for this feature some time ago but please let us know why isn't it possible with Voice Attack ?

- the command "toggle shortcuts" seems not to be working correctly. It only disables them but doesn't reenable

- would like to have a function to check if a window has focus or not

- if i'm using the option to stop a command when target focus is lost and i have a key passthrough blocked enabled in the command the key passthrough is still blocked although the command should not be executed because it hasn't got the focus !!!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: some suggestions & issues
« Reply #1 on: May 24, 2021, 02:40:24 PM »
- i would like to have the possibility to enable/disable commands. It would make scripting things so much easier.
  i already asked for this feature some time ago but please let us know why isn't it possible with Voice Attack ?
Where did you suggest this feature? It's not in your post history.

Either way, commands can already be disabled using the "SetSessionEnabled()" method within an inline function. This will still allow the command to be recognized (but not executed), likely because rebuilding the list of phrases for the speech recognition engine (and other data) would require a profile reload.


- the command "toggle shortcuts" seems not to be working correctly. It only disables them but doesn't reenable
If shortcuts aren't working after re-enabling them (I.E. there is no red icon over the keyboard button on the main window), something one your machine may have broken VoiceAttack's keyboard hook.

Try using the "Reset Keyboard Shortcuts" option of the "Windows Miscellaneous Functions" action, (it may show a message in the log about the handle being invalid, in which case you'll need to run it again).


- would like to have a function to check if a window has focus or not
Only one window can have focus at a time, so if "{ACTIVEWINDOWTITLE}", "{ACTIVEWINDOWPROCESSNAME}", or even "{ACTIVEWINDOWPROCESSID}" don't match the window you're checking, it doesn't have focus.

Squeeze

  • Newbie
  • *
  • Posts: 25
Re: some suggestions & issues
« Reply #2 on: May 24, 2021, 02:56:04 PM »
okay, i see. I forgot one thing: what i intended to do is that no command is processed when the target focus is lost. That would be the simpliest thing for me. Right now i'm doing this with "disable hotkeys". Thanks you and thumbs up for VA!

Squeeze

  • Newbie
  • *
  • Posts: 25
Re: some suggestions & issues
« Reply #3 on: May 24, 2021, 03:09:54 PM »
Quote
Try using the "Reset Keyboard Shortcuts" option of the "Windows Miscellaneous Functions"

tried this but still "Toggle Shortcuts" won't reenable when executed from a command!
searched "SetSessionEnabled()" command in the help but could not find something. Please answers posts with a short code example! Thanks!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: some suggestions & issues
« Reply #4 on: May 24, 2021, 03:12:34 PM »
Is the red icon still shown on the keyboard button on the main window after you attempt to re-enable shortcuts using the "Toggle Hotkeys" action?

If so, does the "Enable Hotkeys" action work?

Squeeze

  • Newbie
  • *
  • Posts: 25
Re: some suggestions & issues
« Reply #5 on: May 24, 2021, 03:14:51 PM »
yes it's still red. Enable works but not Toggling! (Maybe with a variable then)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: some suggestions & issues
« Reply #6 on: May 24, 2021, 03:17:28 PM »
How did you disable listening? Also using the "Toggle Hotkeys" action, or another method (E.G. clicking the button, the "Disable Hotkeys" action, etc...)?

Squeeze

  • Newbie
  • *
  • Posts: 25
Re: some suggestions & issues
« Reply #7 on: May 24, 2021, 03:26:01 PM »
i found out something: ToggleShortcut works if i send the command to Voice Attack as target!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: some suggestions & issues
« Reply #8 on: May 24, 2021, 03:29:59 PM »
The targeting settings for the command shouldn't matter as the action does not send output (it runs an internal method).

Do you have any options configured that would stop the command from executing if a specific target isn't found, E.G. the "Stop command if target window focus is lost" option?

Squeeze

  • Newbie
  • *
  • Posts: 25
Re: some suggestions & issues
« Reply #9 on: May 24, 2021, 03:36:33 PM »
yes, that was the issue! One last thing: i'm using a command which enables shortcuts when pressing right mouse button. When i try to do this with a keyboard press instead it won't enable my shortcuts. Why?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: some suggestions & issues
« Reply #10 on: May 24, 2021, 03:40:22 PM »
Are you asking why you can't use a keyboard key to trigger a command while keyboard shortcuts are explicitly disabled?

Mouse shortcuts (and joystick button shortcuts) are enabled/disabled separately, so disabling keyboard shortcuts won't affect them.

Squeeze

  • Newbie
  • *
  • Posts: 25
Re: some suggestions & issues
« Reply #11 on: May 24, 2021, 03:44:28 PM »
of course, yes.... :o :o  would be nice if we simply could deactivate command processing if target focus is lost and activate processing when focus is regained! But thanks anyways for your help. Good night!

THX1959

  • Newbie
  • *
  • Posts: 4
Re: some suggestions & issues
« Reply #12 on: July 10, 2021, 08:24:17 AM »
"Either way, commands can already be disabled using the "SetSessionEnabled()" method within an inline function. This will still allow the command to be recognized (but not executed), likely because rebuilding the list of phrases for the speech recognition engine (and other data) would require a profile reload."

Um... nope.

It should be available on the short-cut (right mouse click) menu. This functionality shouldn't require coding by the user.

If there are limits the user is about to exceed, warn them or even block them. Otherwise disable it. If the user tries to call the command, show it as disabled in the selection list. If they try to use it (with voice) reply with "Disabled."

Asking for a friend.  8)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2824
Re: some suggestions & issues
« Reply #13 on: July 10, 2021, 08:38:52 PM »
That is not an action by design, as its use is highly uncommon currently.  If an action becomes something that is commonly used, it will be entered into the UI menu layout.