VoiceAttack
Profiles, Commands and Plugins => Profile and Command Discussions => Topic started by: Incurable-Rash on May 16, 2019, 02:11:31 PM
-
I am trying to create a command the will enter the following information in the order listed. I want to beable to say the name and number listed after "scout"
16/5 20:01
pam.scout Biliri 0 0 0
I have the below working so far but the rest I am stuck. any suggestions or references would be helpful.
Thanks
Set date [scouting date time] value to the current date/time (UTC)
Quick Input, '{DATEDAY:scouting date time}'
Press / ? key and hold for 0.1 seconds and release
Quick Input, '{DATEMONTHNUMERIC:scouting date time}'
Press Space key and hold for 0.1 seconds and release
Quick Input, '{TIME:scouting date time}'
Press Enter key and hold for 0.1 seconds and release
Quick Input, 'pam.scout'
Press Space key and hold for 0.1 seconds and release
-
Is this name something predefined (I.E. something you can pick out of a list), or arbitrary?
If it can be listed, I'd suggest using the "Wait For Spoken Response" action, instead of putting it all in one command phrase. Otherswise, with the addition of three numbers from 0-9, you'll have 1000 command phrases for each name added.
E.G.
Set date [scouting date time] value to the current date/time (UTC)
Set Text [~datetimeformat] to 'd/M hh:mm'
Wait for spoken response: 'Biliri;other name'
Play sound, 'C:\Windows\media\ding.wav'
Wait for spoken response: '[0..9]'
Play sound, 'C:\Windows\media\ding.wav'
Wait for spoken response: '[0..9]'
Play sound, 'C:\Windows\media\ding.wav'
Wait for spoken response: '[0..9]'
Quick Input, '{DATETIMEFORMAT:scouting date time:~datetimeformat}[ENTER]pam.scout {TXT:~name} {TXT:~firstNumber} {TXT:~secondNumber} {TXT:~thirdNumber}'
I'm using a text value to format the datetime value's output, the parameters for that can be found here (https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings).
-
thanks I will give it a try
-
I'm sorry I missed the question the information is arbitrary
Name and 3 seperate numbers
and where would the wait for spoken response be found in VA
-
Do the numbers have an arbitrary amount of digits as well?
For the name (and the numbers, if the answer to the above question is affirmative), you'll have to use dictation:
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Set Text [~name] to '{DICTATION}'
Now, chances are you'll find the accuracy isn't great; Only thing you can do is train your speech recognition profile as best you can, and speak clearly.
If you're trying to dictate names, you'll probably also come across ones that aren't in the dictionary, meaning you have to add them manually before they'll be recognized.
where would the wait for spoken response be found in VA
"Other >", "Advanced", "Get User Input", "Wait For Spoken Response"
-
there are a possible 80 names so if dictation doesn't do it typing it in may be the way.
The numbers are 0..999 for each of the number categories and if I remember correctly VA will enter numbers below 1000.
-
You'll have to use dictation for numbers that large ("Wait For Spoken Response" is limited to 250 possible phrases, for performance reasons).
Because of that, you'll also need to convert from written numbers for the first ten ("zero"-"nine"), making the command look something like this:
Set date [scouting date time] value to the current date/time (UTC)
Set Text [~datetimeformat] to 'dd/M hh:mm'
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Set Text [~name] to '{DICTATION}'
Start Loop : Repeat From 1 to 3
Play sound, 'C:\Windows\media\ding.wav'
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Begin Text Compare : [{DICTATION}] Contains 'One'
Set Text [~number{INT:~loopCount}] to '1'
Else If Text Compare : [{DICTATION}] Contains 'Two'
Set Text [~number{INT:~loopCount}] to '2'
Else If Text Compare : [{DICTATION}] Contains 'Three'
Set Text [~number{INT:~loopCount}] to '3'
Else If Text Compare : [{DICTATION}] Contains 'Four'
Set Text [~number{INT:~loopCount}] to '4'
Else If Text Compare : [{DICTATION}] Contains 'Five'
Set Text [~number{INT:~loopCount}] to '5'
Else If Text Compare : [{DICTATION}] Contains 'Six'
Set Text [~number{INT:~loopCount}] to '6'
Else If Text Compare : [{DICTATION}] Contains 'Seven'
Set Text [~number{INT:~loopCount}] to '7'
Else If Text Compare : [{DICTATION}] Contains 'Eight'
Set Text [~number{INT:~loopCount}] to '8'
Else If Text Compare : [{DICTATION}] Contains 'Nine'
Set Text [~number{INT:~loopCount}] to '9'
Else If Text Compare : [{DICTATION}] Contains 'Zero'
Set Text [~number{INT:~loopCount}] to '0'
Else
Set Text [~number{INT:~loopCount}] to '{TXTNUM:"{DICTATION}"}'
End Condition
End Loop
Quick Input, '{DATETIMEFORMAT:scouting date time:~datetimeformat} pam.scout {TXT:~name} {TXT:~number1} {TXT:~number2} {TXT:~number3}'
-
I have followed the example you provided, but it keeps saying number not set for all three. It does capture the name.
I have gone over the code a dozen times and can't see anything wrong. Clearly I am missing something.
I attached the VAP to see someone can spot what I am doing wrong.
-
You need to actually set "~loopCount". Enter that variable name into the Start Loop window's "Indexer Name" field, so it writes the current count to it.
Looks perfect otherwise :)
-
First thanks for all the help creating this command.
I have found a script that will get the system name out of my game journals.
The script was done in AutoHotKey
I am not sure how to best incorporate it into my VA command
Any suggestion would be great
Thanks
-
As "MonitorSystem.exe" is presumably the compiled version of that script, you can run it, wait for it to exit, then read the contents of the file it outputs into a variable.
E.G.
Run application 'MonitorSystem.exe' - wait until it completes
Set Text [~name] to [Systemname.log]
-
The way this exe seem to work is to be running in the back ground, and polling the last jump information and putting it into the systemname.log. the log changes on every jump and will not update with the notepad open. when it is opened it only displays one name.
-
In that case that file should always contain the latest info, no?
So you only need
Set Text [~name] to [Systemname.log]
-
yes it always has the current information.
when I run the script you gave me it inputs systemname.log not the contents of that log.
Clearly I am missing something that I forgot to add to make it read the file
-
Are you using the "Value from file/URI" option of the "Set a Text Value" action?
You want to enter a path to that file in there.
-
At least someone reads the whole list of options, clearly I don't
Thanks that worked.
-
In the above commands, it loops 3 times for 3 different sequences of numbers, is there a way to have say something for each of the 3 sequences.
-
Can you clarify "have say something"?
-
The command loops 3 time to collect data to print out, I want to it to say for each loop what needs to go in that number sequence.
ie, 1.merits stolen 2. cargo stolen 3. percentage undermined
-
You could replace
Play sound, 'C:\Windows\media\ding.wav'
with something like
Begin Integer Compare : [~loopCount] Equals 1
Say, 'merits stolen'
Else If Integer Compare : [~loopCount] Equals 2
Say, 'cargo stolen'
Else
Say, 'percentage undermined'
End Condition
-
Thank you for all your help it work fantastically.