Author Topic: Keybord shortcuts ON and OFF  (Read 1172 times)

johnliem

  • Newbie
  • *
  • Posts: 49
Keybord shortcuts ON and OFF
« on: January 26, 2020, 02:14:24 AM »
Hello

How do I make a Keybord shortcuts ON and OFF, I could make a command to off the keyboard but I could not make it back to On, in stead I need to click on the icon of the keyboard to make it On,

the other question, is it possbile to let VA to detect a game to a certain profile? for example


when I start ED, VA will switch to Profile ED, and when I start EuroTruck,VA will switch to Profile ET.  thanks

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Keybord shortcuts ON and OFF
« Reply #1 on: January 26, 2020, 02:38:49 AM »
How do I make a Keybord shortcuts ON and OFF, I could make a command to off the keyboard but I could not make it back to On, in stead I need to click on the icon of the keyboard to make it On,
Turning off keyboard shortcuts will logically prevent commands from being triggered by keyboard keys, however it is still possible to use the other methods for getting keyboard key states.

E.G. you could have a "toggle keyboard shortcuts" command like
Code: [Select]
Begin Text Compare : [{STATE_SHORTCUTS}] Equals '1'
    Disable Hotkeys
    Start Loop While :  Keyboard Key 'F2' Is Pressed
    End Loop
    Start Loop While : (Keyboard Key 'F2' Is Not Pressed AND [{STATE_SHORTCUTS}] Equals '0')
    End Loop
    Enable Hotkeys
Else
    Enable Hotkeys
End Condition
Which would keep the loop running after you disable keyboard shortcuts, polling for the key you'd also use the trigger the command initially (F2 in this example), and turning shortcuts on when it's pressed again.
There's also a check to see if shortcuts were enabled by other means (E.G. clicking the icon), in which case the loop will also stop.


the other question, is it possbile to let VA to detect a game to a certain profile? for example


when I start ED, VA will switch to Profile ED, and when I start EuroTruck,VA will switch to Profile ET.  thanks
Yes. As described in the manual (Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer), you can check the "Enable Auto Profile Switching" option on the "General" tab of the VoiceAttack options window to monitor which application has focus, and if it matches what is entered into the "Enable profile switching for the following windows or processes" option on the "Profile General" tab in the profile options for that profile.

johnliem

  • Newbie
  • *
  • Posts: 49
Re: Keybord shortcuts ON and OFF
« Reply #2 on: January 26, 2020, 02:42:30 AM »
okay thank you again for quick respons.