Author Topic: After Upgrading to .36 Beta I believe. Problem running External VA Commands.  (Read 8856 times)

iceblast

  • Sr. Member
  • ****
  • Posts: 374
~^!F19::run, C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe -command "HotKeys On"

Problem running External VA Commands. That have a Space in the name. "HotKeys On" has worked for a very long time. but now VA throws and Unexpected error, (HotKeys) It doesn't see the ON. If I rename the command to just HotKeys, it works again.

I believe this still worked with Beta .31, because I don't remember any Unexpected errors. So, I'm guessing something was changed with Beta .36

Hope there is a easy fix. :)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Works on my machine (with double quotes).

I tried command prompt, a shortcut, AutoHotkey, and VoiceAttack itself.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Hey, iceblast - I'm not able to reproduce this either.  It seems to be working fine.

I do know that if you are running VA as an admin and, for instance, you have a shortcut that is not set up to run as an admin, Windows will block the running instance from being notified.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
When I run this command, run, C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe -command "HotKeys On" I get this error. I've shut down VA many times, makes no difference. If I make it just one word, the command runs fine though.

11:57:02 PM - UNABLE TO EXECUTE EXTERNALLY INITIALIZED COMMAND. COMMAND NOT AVAILABLE (HotKeys)

Hmm, I'm running Admin, let me change that and see if it fixes it.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Yup, that was the problem, thanks, I had checked the Admin box in VA when I loaded the new beta, and didn't think anything of it, because I've always had VA running as Admin. Apparently, checking the box, caused the problem. :)

Glad to figure that problem out. :)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Very strange - it shouldn't matter if it's one or two words.  Are there any other details you can provide?  For instance, I'm not able to make a shortcut run with a single word with VA running as an admin (and the shortcut not running as an admin).

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Hmm, only what I've said. "HotKeys On" didn't work, but "HotKeys" would. After I unchecked Admin in VA options, "HotKeys On" started to work again.

The Icon for VA, I have set to run as Admin. When I installed .36 Beta, I was looking over the settings under options, and saw the check box to run as Admin, so I checked it, and never thought it might have had something to do with my problem. After unchecking it, the problem was solved. Maybe having it run as Admin from the Icon, as well, as inside VA, caused the problem. Not sure.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Aha, if the "Run VoiceAttack as an Administrator" option is checked, the "-command" option does not work correctly as the space in the command name and anything after it will be cut off.
This occurs even when the option is passed when initially launching VoiceAttack, not just when passing it from a new instance.

If I edit user.config while VoiceAttack is running to set "RunAsAdmin" to "False", it works properly when the new instance is manually launched as admin (I used the context menu, though the compatibility option should be the same).


I also tried running VoiceAttack as admin manually while the "Run VoiceAttack as an Administrator" option is also set, however the combination of both does not appear to make a difference (it fails if the option is set, works when it isn't).


This is not an issue with the "-command" option specifically: "-input", for example, doesn't work with the "Run VoiceAttack as an Administrator" option checked either (it doesn't output which device was not found - which perhaps it should - but I'd wager it's also cutting off anything with a space, thus passing an erroneous device name).
« Last Edit: June 21, 2019, 05:25:08 AM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
I'll take a look at it.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Hey, iceblast.  I popped a build out in the, 'unofficial' bin if you want to take it for a whirl:

http://voiceattack.com/unofficial 

Would have had this out sooner for you, but it's been an unusual day o_O

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Ok cool, I'll give it a try.

Sorry, didn't make any difference.

The moment I turn Admin on in VA, it stops working. I even tried turning off Admin from the Icon, and only running it in VA, and still made no difference.

If Admin in VA is checked, you can't use a space in -command lines for VA. Unchecked, and using Spaces works fine.

It's not a big deal for me though, because I can still run in Admin outside of VA. I just won't use the one inside.

Thanks for looking at it though.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Can confirm, in v1.7.5.37 it still gets cut off:

Code: [Select]
'.\VoiceAttack.exe' -command "test one"
Quote
UNABLE TO EXECUTE EXTERNALLY INITIALIZED COMMAND. COMMAND NOT AVAILABLE (test)


EDIT: Working in v1.7.5.39
« Last Edit: June 22, 2019, 02:55:49 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Ah - yeah.  Missed a spot.  I've uploaded a new build to unofficial.  http://voiceattack.com/unofficial

Hoping that does it.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Hold up - I want to make one adjustment to this (removed file).

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Ok - now it's available again (I wanted to simplify a couple parts in there).  If this works for you, I will post another beta (this is kind of an important part).

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Yup, that did the trick! :)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Awesome!  Thank you for trying that out :)