Author Topic: Tie Profile to Specific Game and Respect Focus  (Read 1396 times)

Starblue7

  • Full Member
  • ***
  • Posts: 131
Tie Profile to Specific Game and Respect Focus
« on: March 03, 2023, 07:14:38 PM »
Perhaps there's some easy setup here that I'm missing.

However, while I can certainly specify the TARGET application where I want my VoiceAttack commands to go to.  I see no way to specify to NOT process any VoiceAttack commands if the intended application doesn't have the focus.

So, you know there are applications like Razer and Logitech that, when a game is loaded and has focus, the profile set up in those applications will be enabled.
This then means that commands made in devices like from Razer and Logitech will change and function in a way (Macros etc) as directed by the user for the game in focus.

well, in VoiceAttack, for example, if I set up a command that will get kicked off by a KeyPress, then that impacts me typing in this window for example.  I have 'Shift+w' specified in VoiceAttack, but it's not allowing me to type a capitalized 'w' in this text because the 'Shift+w' is defined in a running profile.

So, even if I tab out of the game that the profile is intended for, the impact stays across applications.  If I set a dbl-tap for 'shift+w' (for example) that's meant for the game, but if I do that action here, in a chrome window, then it will kick off that action.

So what I would like is a way to say:  X Profile is loaded and activated for X Game, and have an option to say that ANY (specific or global) commands will only be kicked off when X Game has the focus.

Anything I can do?

Sorry if this is simple and I'm not seeing it..

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Tie Profile to Specific Game and Respect Focus
« Reply #1 on: March 03, 2023, 07:21:57 PM »
If you enable (check) the "Enable Auto Profile Switching" option on the "General" tab of the VoiceAttack options window, VoiceAttack can automatically switch profiles when you switch to a different window.

You'd also need to set the "Enable profile switching for the following windows or processes" option at the profile level.
For the default profile (I.E. the one that will be loaded when none of the windows or processes you have specified explicitly have focus), set the "Enable profile switching for the following windows or processes" option to a single asterisk ("*").
« Last Edit: March 03, 2023, 09:32:26 PM by Pfeil »

Starblue7

  • Full Member
  • ***
  • Posts: 131
Re: Tie Profile to Specific Game and Respect Focus
« Reply #2 on: March 03, 2023, 09:29:53 PM »
Thanks Pfeil.

It's not quite as intuitive as I'd like, but I managed to get it working.


iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Tie Profile to Specific Game and Respect Focus
« Reply #3 on: March 04, 2023, 08:15:04 PM »
You can set commands in commands.

Code: [Select]
Begin Text Compare : [{ACTIVEWINDOWPROCESSNAME}] Equals 'EliteDangerous64'
    Press Tab key and hold for 0.02 seconds and release
End Condition

So if you hit the command key, it will only run if the active window is the program in question. No need to change profiles.

This way, you could have as many programs as you want running different commands, all by using the same trigger key.

And if none of those programs active, you can set a default key to run, basically it will just run the key/ keys your pressing if that's what you want.

If you do this right, you never need to change profiles.

{ACTIVEWINDOWTITLE}

{ACTIVEWINDOWPROCESSID}

You can use as well.

Starblue7

  • Full Member
  • ***
  • Posts: 131
Re: Tie Profile to Specific Game and Respect Focus
« Reply #4 on: March 04, 2023, 09:06:58 PM »
Thanks for the further information.
It might be worth a shot on some outlier case-by-case scenario.
I'm not sure I want to require this in the commands execution of all my commands.
I wonder if there's any performance hit due to your idea above.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Tie Profile to Specific Game and Respect Focus
« Reply #5 on: March 05, 2023, 08:12:39 PM »
No performance hit. I have commands that have 50+ {ACTIVEWINDOWTITLE} commands for 50+ different programs, all Activated by 1 key. I have a 20 button mouse I use. I use keys F13-F24. The command run instantly, and only runs if said program is targeted. If the command does otherwise, you did something wrong.

I've been using VA for probably 7+ years, and it will do most anything you can think of, if you can think your way around it.

It has a ton of flexibility, and the commands are so easy to make.

There are a lot of videos on youtube, that will teach you all kinds of tricks you can do, and they are all easy to do, and once you get the logic behind it all, you'll be making tons of your own commands.