Author Topic: Command Line Option "-command" not working as expected  (Read 3606 times)

billyjack669

  • Guest
Command Line Option "-command" not working as expected
« on: July 03, 2018, 09:22:34 AM »
VA version 1.7.0.15 -
I use VA at work to automate repetitive tasks (and quickly organize my windows across my monitors).  It would be awesome if I could get this working.  Currently if I want to schedule a VA task, I first use taskkill on the VA process then run it with the -command option to get it started.

According to the manual:
-command “My Command Name” Executes the command specified by name in the
running profile. Note that double quotes are only necessary if your command name has
spaces in it.

Is this one of the command line options that should work on the currently running instance?  I can only get it to work when starting a new instance.

It does not mention if it's a "startup only" option, unlike -verifyaudio and others:
-verifyaudio This will make VoiceAttack check all ‘play a sound’ and ‘play a random’ sound
files to see if they exist. This just runs at startup and does not affect the already-runninginstance


« Last Edit: July 03, 2018, 09:32:54 AM by billyjack669 »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Command Line Option "-command" not working as expected
« Reply #1 on: July 03, 2018, 09:57:00 AM »
Can you do me a huge favor? 

Can you try changing the task setting, 'If the task is already running, then the following rule applies' from 'Do not start a new instance' to, 'Run a new instance in parallel'?  I'm thinking that the task scheduler is looking for VA, sees it running and then just drops the process.

Let me know if that works!


billyjack669

  • Guest
Re: Command Line Option "-command" not working as expected
« Reply #2 on: July 03, 2018, 10:03:53 AM »
Honestly at this point I'm just testing it using the command line.  I've got a normal and elevated cmd running and type:
"c:\Program Files (x86)\VoiceAttack\VoiceAttack.exe" -command browser
Or inside the VA directory i'll run VoiceAttack.exe -command browser

But get no response from running it.
At this time my VA is running as admin, but it won't do it in normal or elevated mode.

Windows 10 Pro x64 build 1803.



billyjack669

  • Guest
Re: Command Line Option "-command" not working as expected
« Reply #3 on: July 05, 2018, 08:39:57 AM »
Bump?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Command Line Option "-command" not working as expected
« Reply #4 on: July 05, 2018, 08:52:50 AM »
Have you tried this on your home machine and not on your corporate computer?  Your domain may have some type of restrictions that are not accounted for.  Outside of that, I don't know where to guide you, as that is basic functionality that's been in VA for years that I use each and every day with this setup.

billyjack669

  • Guest
Re: Command Line Option "-command" not working as expected
« Reply #5 on: July 05, 2018, 08:55:49 AM »
That's a great thought.  I did try it on a laptop, but it is also domain joined.  I will install it on a plain jane laptop with Windows 10 and test it.   Thanks for the suggestion, I will report back either way and start digging after that. 

billyjack669

  • Guest
Re: Command Line Option "-command" not working as expected
« Reply #6 on: July 05, 2018, 12:09:04 PM »
I tried it on a laptop and it worked fine.
I tried it on another domain connected computer and it worked fine.
I did not register either copy, nor did I import my profile to them.

I will now uninstall VoiceAttack on my primary PC and try again with a fresh install (no profile) and go from there.
Any tips on how to ensure a complete "clean sweep" of the software?

billyjack669

  • Guest
Re: Command Line Option "-command" not working as expected
« Reply #7 on: July 05, 2018, 12:53:33 PM »
I lose the ability to run from command line option when checking "Minimize to System Tray".
« Last Edit: July 05, 2018, 12:56:39 PM by billyjack669 »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Command Line Option "-command" not working as expected
« Reply #8 on: July 05, 2018, 01:21:09 PM »
That's an interesting find. I will see if I can reproduce the problem when I get back in.


EDIT- Yup, it's definitely doing that.  I'm going to have to dig in on this one, as it looks like it's a handle issue (it's losing its handle).  I have no ETA on the fix, unfortunately.  The only workaround for the time being is to not pass -command line params in for multiple instances when set to, 'minimize to system tray'.  Also, if you are running it from a scheduled task, I believe you can have the task kill the running instance if you want it to.  Just a suggestion.
« Last Edit: July 05, 2018, 04:07:03 PM by Gary »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Command Line Option "-command" not working as expected
« Reply #9 on: July 05, 2018, 09:24:44 PM »
I've uploaded a version to the VoiceAttack, 'unofficial' bin.  If you wouldn't mind, would you download this version and see if this fixes the issue for you?  All you do is download from here:  http://www.voiceattack.com/unofficial

and replace your VoiceAttack.exe with that version (rename your old .exe).

Sorry about that.  I misread your earlier post as you were going to test outside of the scheduled task. 

Hoping this will solve your problem!

billyjack669

  • Guest
Re: Command Line Option "-command" not working as expected
« Reply #10 on: July 06, 2018, 07:14:07 AM »
Interesting- It will now launch external commands if Minimize to Taskbar is set and the VoiceAttack window is visible (not minimized).
It still fails to launch if it's in the system tray.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Command Line Option "-command" not working as expected
« Reply #11 on: July 06, 2018, 07:51:31 PM »
Ok, I've uploaded another build to the, 'unofficial' bin once again.  Would you mind giving this one a whirl? 

http://www.voiceattack.com/unofficial

Thanks for working with me on this!

billyjack669

  • Guest
Re: Command Line Option "-command" not working as expected
« Reply #12 on: July 09, 2018, 08:38:27 AM »
That did it!

Thanks so much Gary!  Glad I could help test with you.