Author Topic: Sound Device - on exit?  (Read 327 times)

scottb613

  • Newbie
  • *
  • Posts: 32
Sound Device - on exit?
« on: August 04, 2024, 06:45:42 AM »
Hi Folks,

Just a quick question - I use the VA feature to set my sound device to my headset on VA startup. Works like a champ.

While I know it's a minor inconvenience - I was wondering if you could share a method on how to set the default device back to my speakers on exit? Can I address via a command in a VA profile or with an external bat file or something? I've tried using mouse macros and they don't work that well - as the order or location of the speakers device changes from time to time.

VA - the BEST ten bucks I've EVER spent on a piece of software.

Thanks for all you do.
 :)

Regards,
Scott

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4767
  • RTFM
Re: Sound Device - on exit?
« Reply #1 on: August 04, 2024, 06:53:35 AM »
That can be done using a command, however that command will need to be present in any active profile (I.E. the one shown on the "Profile" dropdown on VoiceAttack's main window; included and global profiles don't have their "Profile Exec" options executed).

To prevent the device change happening whenever a profile is switched, you could check the value of the "{CMDACTION}" token to make sure it's "ProfileUnloadClose", indicating that the command is being executed because VoiceAttack is closing.

Changing devices is done using the "Change Default Audio Devices" action, as its name suggests.


Such a command could look like this:
Code: [Select]
Begin Text Compare : [{CMDACTION}] Equals 'ProfileUnloadClose'
    Change multimedia playback device to: 'Speakers (Realtek Audio)'
End Condition
(obviously the device would be set to your actual device)

The command should be assigned to the "Execute a command each time this profile is unloaded" option on the "Profile Exec" tab in the profile options of any profile you want to perform this function (said profile must also contain the command; commands can be copied between profiles)

scottb613

  • Newbie
  • *
  • Posts: 32
Re: Sound Device - on exit?
« Reply #2 on: August 04, 2024, 07:32:03 AM »
Hi Pfeil,

As always - thanks so much for the instantaneous LIGHTNING response time - if only such help was available for other products (even with paid support contracts).
:)

Let me give this a shot.

Regards,
Scott