Author Topic: done.. just tell me what I need to do... please  (Read 2384 times)

vaguexrdx

  • Newbie
  • *
  • Posts: 33
done.. just tell me what I need to do... please
« on: October 17, 2020, 06:57:27 AM »
Done trying to figure out how to disable hotkeys when I don't want them in use.  I only use 4 hotkeys... and they are the 1,2,3,4 on the keyboard.  its for elite dangerous pips.... first of all I would prefer to bind them to my mouse buttons but that doesn't seem to be a feature at all.. so how do I just disable/enable the profile with a hotkey... or something.. I don't think profile switching would work because you need to type digits in the game so .. idk

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: done.. just tell me what I need to do... please
« Reply #1 on: October 17, 2020, 07:27:10 AM »
Commands can be set up to be triggered by mouse buttons using the "When I press mouse" option (two items below "When I press keys").


If you want to disable one or more commands that use the "Do not allow key to be passed through" option, you could either disable hotkeys entirely (meaning you'd need to use a spoken command to re-enable them), or switch to another profile that has a command in it which uses a (different) hotkey to switch back to the profile that contains your "pips" commands.

vaguexrdx

  • Newbie
  • *
  • Posts: 33
Re: done.. just tell me what I need to do... please
« Reply #2 on: October 17, 2020, 07:30:39 AM »
can you just connect to my PC  ;D also why does VA only work in admin mode. it wasn't always like that.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: done.. just tell me what I need to do... please
« Reply #3 on: October 17, 2020, 07:33:58 AM »
Applications that run as administrator cannot be interacted with by applications that don't (this is a Windows security measure).

If you are, directly or indirectly, running a target application as administrator, VoiceAttack needs to run as admistrator to be able to send input to it, and to receive input while that application has focus.

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: done.. just tell me what I need to do... please
« Reply #4 on: October 17, 2020, 06:41:52 PM »
This command would only work while you're in Elite, and when you're not, it would return the 1 key, back to 1.

Check don't allow key to pass through.

Code: [Select]
Begin Text Compare : [{ACTIVEWINDOWPROCESSNAME}] Equals 'EliteDangerous64'
    Press Up key and hold for 0.03 seconds and release
End Condition - Exit when condition met
Press and release 1 key

Or

You can leave don't allow key to pass through unchecked.

Code: [Select]
Begin Text Compare : [{ACTIVEWINDOWPROCESSNAME}] Equals 'EliteDangerous64'
    Press Up key and hold for 0.03 seconds and release
End Condition - Exit when condition met

With this command there is no need to change profiles. The command would only work, if your in Elite. In this way, you can have many different commands for many different programs, all using the same key, and profile, by using this same method, targeting each program directly.


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: done.. just tell me what I need to do... please
« Reply #5 on: October 17, 2020, 06:59:46 PM »
The silly thing is that I have commands that do exactly that for the exact same reason, but didn't think of that technique here ::)

Well spotted, iceblast


If you need to have the ability to hold down the key(s), you'd want to use loops, E.G.
Code: [Select]
Begin Text Compare : [{ACTIVEWINDOWPROCESSNAME}] Equals 'EliteDangerous64'
    Press down Up key
    Start Loop While :  Keyboard Key '1' Is Pressed
    End Loop
    Release Up key
Else
    Press down 1 key
    Start Loop While :  Keyboard Key '1' Is Pressed
    End Loop
    Release 1 key
End Condition
(using the "Condition Else" action or checking the "When this block is reached, exit command if condition is met" option in the "End a Conditional Block" action is functionally identical in this case; Use whichever is most visually clear to you)


As you mentioned need to be able to toggle this on and off ingame, instead of checking the process name you'd want to use a variable, E.G.
Code: [Select]
Begin Boolean Compare : [hotkeysEnabled] Equals False
    Press down 1 key
    Start Loop While :  Keyboard Key '1' Is Pressed
    End Loop
    Release 1 key
Else
    Press down Up key
    Start Loop While :  Keyboard Key '1' Is Pressed
    End Loop
    Release Up key
End Condition
(check the "Evaluate 'Not Set' as false" option)

[enable;disable] hotkeys
Code: [Select]
Begin Text Compare : [{CMD}] Contains 'enable'
    Set Boolean [hotkeysEnabled] to True
Else
    Set Boolean [hotkeysEnabled] to False
End Condition


Note that the main limitation of this technique is that keys pressed by software do not cause character repeats, meaning when you hold down the "1" key, it will only type a single "1" character, rather than many of them after a short delay.