Author Topic: switch profile by name  (Read 6513 times)

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
switch profile by name
« on: October 24, 2016, 05:17:39 AM »
As we have the ability to run a command by name, could we also have switch to a profile by name too please :)

I'm actually trying to switch to a profile so that commands in the start profile are turned off and then I can switch back. This works great until you export it for people and it re-imports as unable to find profile due to the ID tag.

Thanks,

TheThingIs


EDIT by Pfeil: Switching profiles by name is possible using the "Switch by name (Advanced)" option of the "Switch to Another Profile" action.
« Last Edit: April 18, 2020, 07:28:37 AM by Pfeil »
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: switch profile by name
« Reply #1 on: October 24, 2016, 05:43:04 AM »
There is currently a way to switch profiles by name: Have VoiceAttack start itself, with a "-profile" parameter.

E.G.
Code: [Select]
Run application '{VA_DIR}\VoiceAttack.exe' -with parameters '-profile "MyProfile"'

Though, can you clarify what you're trying to accomplish by doing this? What do you mean by " so that commands in the start profile are turned off"?

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: switch profile by name
« Reply #2 on: October 24, 2016, 06:06:55 AM »
I'm basically trying to modularise a profile.

One example is the new version of elite you can exit your ship and temporarily fly another ship. When you do this alot of commands change so I want those commands to switch off and new ones to come online. It works well switching to another profile. I know I could do it by putting a check in to every command so that if you are in the fighter then exit this command but it's a lot to add in on every command just to do that. Switching profiles essentially will alter what VA is then listening for.

Another example would be a profile to ask a question and wait for the correct reply. In a large profile I can't just ignore all the current commands as being an answer but if I switch profile then I can simply wait for the correct answer to be said. Essentially switching on and off commands which are being listened for.

If that makes sense :)

oh and the above example means closing and restarting VA. As it stands now the variables are carried through when switching profiles and switching profiles by stopping and restarting va would break that.
« Last Edit: October 24, 2016, 06:15:23 AM by TheThingIs »
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: switch profile by name
« Reply #3 on: October 24, 2016, 01:28:20 PM »
oh and the above example means closing and restarting VA. As it stands now the variables are carried through when switching profiles and switching profiles by stopping and restarting va would break that.
Commandline parameters passed when VoiceAttack is already running apply to the running instance. You don't lose variables, because VoiceAttack never closes.

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: switch profile by name
« Reply #4 on: October 24, 2016, 02:09:52 PM »
Brilliant Pfeil, that works a treat. You are a fountain of knowledge :)
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.