Author Topic: Can you specify a command from another profile when using "execute a command"  (Read 1526 times)

bootrossbootross

  • Newbie
  • *
  • Posts: 11
Hi all

an example of what im trying to do:

I have a voice command set up in profile_master - when i say "drive" press "d", a voice only command.

I am trying to set a command in profile_joystickX - when I hit button 1, execute "drive" from profile_master.  Im using other/voice attack actions/execute command - but only commands from within the profile_joystickX are selectable.

The profile_joystick X profile is set to use commands profile_master in the general options, but is there a way to select a specific command from another profile using other/voice attack actions/execute command? 

I have to do this as VA sees different wheels (with different button configs and numbering) on the same wheelbase as the same controller, hence i have to set up different profiles for each wheel - and im trying to minimise duplicate commands.  I know i could just forget trying to use the master voice profile and incorporate the full list into each controller profile but just wondering if its possible as i have laid out.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
The "Execute by name (Advanced)" option of the "Execute Another Command" action allows you to type in any command phrase, which will be resolved when the command executes.

If a command with that command phrase is accessible in any of the available profiles (I.E. within the active profile, a profile whose commands are included into the active profile, or a global profile), it will be executed.

Note "command phrase", E.G. if you have a command with the "When I say" contents "my command [with;] [option a;option b];my command with option c", you'd use something like "my command option a" in the "Execute by name (Advanced)" field (as if you were speaking the command), not the entire contents of the "When I say" field.


An alternative to multiple profiles would be to use variable keypresses, where you set text variables to the desired keypress (press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer and see the "Quick Input, Variable Keypress and Hotkey Key Indicators" section for the syntax)

E.G. if you have a command that triggers off button 1, it could contain
Code: [Select]
Press variable key(s) [button1Action] and hold for 0,03 seconds and release

And you'd use a command like "using steering wheel a", containing something like
Code: [Select]
Set text [button1Action] to 'p' (save value to profile)
to change wheels (so that when you speak the command, button 1 is then set to press the "p" key)

Combined with a command that runs when your profile loads, to retrieve the last-used settings:
Code: [Select]
Set text [button1Action] to [Saved Value]


If you require more advanced commands mapped to buttons, rather than using a variable keypress actions in your button commands, you could use the "Execute Another Command" action with the "Execute by name (Advanced)" option set up something like
Code: [Select]
Execute command, '{TXT:button1action}' (by name)
and set the contents of "button1action" to a command phrase instead.

bootrossbootross

  • Newbie
  • *
  • Posts: 11
Thank you Sir, I will try the execute by name option - I stayed away from it as its labellled advanced and anything advanced i quickly get out of my depth (i bought in to Iracing after all...).

Thats why I havent yet tried and use variable key press - the info is great in the manual but I just cant get my head around it, maybe one day...
But thanks for the suggestions - I will try playing around with them to see if i can make it work that way as one profile would be great as I assume it would be less delays for the critical commands I need.