Author Topic: Restart VA while DCS is running?  (Read 1563 times)

radial madness

  • Newbie
  • *
  • Posts: 8
Restart VA while DCS is running?
« on: April 24, 2020, 06:42:08 PM »
Occasionally VA will crash when using the Vaicom Pro plugin in DCS.  This can be rather annoying when deep into a long and intense mission.  Is there a way to restart VA without exiting the DCS mission?  Thanks for any suggestions!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Restart VA while DCS is running?
« Reply #1 on: April 24, 2020, 06:55:01 PM »
If a plugin is causing VoiceAttack to crash, you'll want to notify the plugin author about that.


Can you elaborate on what you mean by restarting "without exiting the DCS mission"? Are you unable to alt-tab out?

Do you have a keyboard or mouse that comes with macro keys you can bind in the driver software? You could use that to launch VoiceAttack when needed.

radial madness

  • Newbie
  • *
  • Posts: 8
Re: Restart VA while DCS is running?
« Reply #2 on: April 24, 2020, 07:10:45 PM »
If a plugin is causing VoiceAttack to crash, you'll want to notify the plugin author about that.


Can you elaborate on what you mean by restarting "without exiting the DCS mission"? Are you unable to alt-tab out?

Do you have a keyboard or mouse that comes with macro keys you can bind in the driver software? You could use that to launch VoiceAttack when needed.

The problem definitely lies with the plugin and is not a VA issue BUT the plugin saves valuable time issuing complex commands in DCS A-10C such as 9 Line communications with forward air controllers.  Alt-tab does not minimize the simulator and I have bare bones mouse/keyboard.  I do have VAC (haven't used it for a couple of years since discovering VA) and was thinking of setting up a single command profile that would simply execute VA startup when saying something like VAICOM CRASH.  Unless you have something more elegant I will give this a try tomorrow and report back.  Thanks for the quick response.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Restart VA while DCS is running?
« Reply #3 on: April 24, 2020, 07:30:47 PM »
I wouldn't say elegant, but it worked when I last used it (which is quite a while ago now, though):

I have a batch file that can monitor for VoiceAttack's presence, and will attempt to restart it:
Code: [Select]
:watchdog
TIMEOUT /T 1
tasklist /v /FO CSV|find /i "werfault"|find /i "voiceattack"
IF NOT "%ERRORLEVEL%"=="1" (
taskkill /im WerFault.exe
)
tasklist|find /i "VoiceAttack"
IF "%ERRORLEVEL%"=="1" (
start "" "C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe"
TIMEOUT /T 10
)
GOTO watchdog

This will just keep looping and check for VoiceAttack every second (you can increase the interval by changing the "/T 1" on the second line, E.G. "/T 5" to check every five seconds), and if it can't find the process, it will first attempt to close WerFault.exe (part of Windows error reporting, which may show up when VoiceAttack crashes), then to start VoiceAttack again.

If you want to prevent VoiceAttack from waiting at the "VoiceAttack Shutdown Issue" window when it's restarted, check the "Do not show this message again" box on that window (noting that you do this at your own risk, and that it will mean you need to manually press Ctrl-Shift should it ever be required, and will not see a notification when VoiceAttack does not close gracefully).

You can also check the "Start Minimized" option on the "General" tab of the VoiceAttack options window to prevent the main window from popping up on startup and stealing focus from the game, if you haven't already.

radial madness

  • Newbie
  • *
  • Posts: 8
Re: Restart VA while DCS is running?
« Reply #4 on: April 24, 2020, 08:17:45 PM »
Nice!  I'll give the batch file a go this weekend.  It would be preferable to having two voice recognition programs running simultaneously from my perspective.  Where do you recommend executing the file from?  As a stand alone batch file or a call from within DCS?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Restart VA while DCS is running?
« Reply #5 on: April 24, 2020, 08:21:49 PM »
It doesn't matter for the working of the batch file. You could use the "Run an Application" action to have VoiceAttack launch it, if you'd like.

radial madness

  • Newbie
  • *
  • Posts: 8
Re: Restart VA while DCS is running?
« Reply #6 on: April 25, 2020, 07:46:52 AM »
It doesn't matter for the working of the batch file. You could use the "Run an Application" action to have VoiceAttack launch it, if you'd like.

Bravo!!!  It works like a charm.  I'm starting it with the "Run an Application" option and now I can be confident that even if Vaicom Pro crashes VA in the middle of a DCS mission - NOT TO WORRY!  Thanks Pfeil (and is that Willem Dafoe for your avatar?  He is one of a few actors that I will automatically watch just because he plays such a great crazed wiseass!).

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Restart VA while DCS is running?
« Reply #7 on: April 25, 2020, 09:33:15 AM »
is that Willem Dafoe for your avatar?

It is. It's a scene from the short film "The Smile Man".