Author Topic: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?  (Read 9334 times)

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
I used to use this for things, I swear it used to work... It's been a while.

Is this broken?  I've been trying combinations for an hour or so thinking I've forgotten syntax or something about wildcards.  I'm fairly certain I'm following the instructions on the box.

Try it out for yourself and let me know if it's misbehaving:
Code: [Select]
When I say:  *what is the temperature

Actions:
Write [Blue] 'wildcard tokens text = {CMD_BEFORE}  ||  {CMD}  ||  {CMD_AFTER}' to log

Results:
12:53:29 AM - wildcard tokens text = alask  ||  Alaska what is the temperature  || 
12:53:51 AM - wildcard tokens text = washington  ||  Washington what is the temperature  || 

Just some odd results.  odd that it dropped the "a" from the end of alaska in the "cmd_before" token, that wasn't a typo on my part here.  Anyway, I'm back off to my Wile E Coyote shed to craft more crazy commands.  Hope this one is a simple fix (I know wildcards are testy, but I've had better success than this before).


(thanks again for everything! best software I've every owned!)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Yikes - I'm able to reproduce this one.  I'll see what I can do ;)

Thanks for the heads-up!

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Oh, thank you so much, Gary!

I've never really hit a wall that I could not get past, but I literally have hit a wall here and cannot proceed without using {CMD_ACTION}.  It's for the latest release of Falcon BMS that just came out, they switched up their in-game menu tree and I'm rebuilding from the ground up so people can edit everything in the keypress init / main init commands that fire when the profile loads.

I had discovered this issue because I made a set of commands that look like the image below, and when it didn't work, I removed the brackets and put an asterisk before each command word, and when that didn't work, I went down a rabbit hole ending at CMD_AFTER.

What I'd love to know is if brackets ARE the way to go with a command like the image below?  If so, I'll assume it will work when fixed and then just finish whipping these out, polish up all the other parts, and wait patiently for the next update (or beta).  I'm a very patient guy :)

(variable values not shown:)
Code: [Select]
//things in the inits:
Set Text [CATEGORY_HEADER_AIC2] to 'Ai Comms 2 - '
// AI COMMS Menu Lists
Set Text [KEY_AWACS_LIST] to 'Q'
//-AWACS Menu List Keys - Page1
Set integer [AWACS_AWACS Page] value to 1
Set Text [KEY_AWACS_RequestPicture] to '1'
Set Text [KEY_AWACS_Declare] to '2'
Set Text [KEY_AWACS_RequestHelp] to '3'
...etc...


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
"{CMD_AFTER}", like "{CMD_BEFORE}" is used with wildcards in command names. If you don't have a wildcard after your command, "{CMD_AFTER}" will not have a value.

If you want the value of the command without whatever was said before the wildcard, you could do a string replace.
E.G.
Code: [Select]
Set Text [~command] to '{TXTTITLE:"{CMD}"}' (Trim) (Replace '{CMD_BEFORE}' with '')


I'm not sure what you're asking about the brackets; In the form you're using them they're the equivalent of "*Request Picture;*Declare;*Request Help" etc...

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
@SemlerPDX - Not sure how you feel about beta versions, but, I put a build with a fix for {CMD_BEFORE} out in the, 'unofficial' bin:  http://voiceattack.com/unofficial    Just replace your VoiceAttack.exe with that version.

If you are using the Steam version of VA, let me know and I will compile and upload that one.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Thank you both!

@Gary -- Did you mean you fixed CMD_AFTER?  Or literally CMD_BEFORE and the typos it's giving?  (like "alask" when I said "alaska")

I'm fine with beta versions, that will get it up and running for testing.  I'll wait for the fix to hit a release version before distributing the profile to others so I can just enforce using most recent version (and not betas).
Thank you very much for the quick fix!

@Pfeil -- I think I'll do what you suggested if the CMD_BEFORE is now fixed (awaiting a fix for CMD_AFTER), but since I was getting typos with omitted characters in my tests with CMD_BEFORE, I didn't view it as an option, and that's about when I came here for help.  Regarding the brackets, you answered my question - that the asterisk IS applied as one would assume, to each command separated by semicolons within brackets.

This stuff is a lot of fun to lose myself in, like I said, using workarounds or alternate methods, I've never really hit a wall I couldn't get around, until now.  That says something.  Kudos!
« Last Edit: May 19, 2019, 08:55:58 PM by SemlerPDX »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
I don't see anything wrong with "{CMD_AFTER}", on my machine.

In your example, you only have a wildcard on on side:
*what is the temperature

This means you can only speak something before that phrase, E.G. "hello what is the temperature" and have it be recognized (the speech recognition engine may still recognize your command, but anything said after the phrase will be discarded).

In this case, "{CMD_BEFORE}" would contain the text spoken before the phrase, E.G. "hello".

"{CMD_AFTER}" will always be blank in this example, as there is no wildcard after the phrase, thus that text is discarded (if the command is recognized at all).


If you want "{CMD_AFTER}" to gain a value, you must modify your example:
*what is the temperature*

Now you could say "hello what is the temperature please", and "{CMD_BEFORE}" would once again contain "hello", however now, "{CMD_AFTER}" would contain "please".


In other words, only the side(s) of your command phrase that have a wildcard will allow dictation (I.E. non-predefined speech) to be used and recorded in a token.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
I KNEW IT! It was me! And I am so sorry for wasting any of your time, Pfeil.  I've learned something important, if that helps.  Yes, indeed, subtracting the CMD_BEFORE from CMD works, and is the logical way I should have approached the problem to begin with.

To get it in one line, to trim spaces off the ends and middle, and to keep things looking like they do with my messed up use of all caps and camelcase for my variables, I'm using this now and it's firing perfectly every time.  I've copied it over to all the other commands, and it seems I'm about done with this profile.  Time to add some bells and whistles, polish up this turd, and test it out in game.

Code: [Select]
Set Text [~command] to '{TXTTITLE:"{TXTREPLACEVAR:"{CMD}":"{CMD_BEFORE}":""}"}' (Trim) (Replace ' ' with '')


I understand what you mean about CMD_AFTER now, (for something like "what is the temperature in*") and I can't believe I had that one wrong.  I am glad I was able to point out the issue with CMD_BEFORE (re.  alaska != alask -- and would have caused issues).

Thanks again for your help and hope you have a nice evening!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Perhaps a token to return the key portion of the wildcard phrase?  The part that's not wild ;)

Maybe that's in there - can't remember.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
I pushed another build out to the, 'unofficial' bin:  http://voiceattack.com/unofficial   This contains a new token, '{CMD_WILDCARDKEY}'.  This returns the wildcard key expression (the static part - or part that's not variable). Turns out that info was readily available without processing - just needed to expose it.

*what temperature is it*

"Alaska what temperature is it today"

{CMD_BEFORE} = 'Alaska'
{CMD} = 'Alaska what temperature is it today'
{CMD_WILDCARDKEY} = 'what temperature is it'
{CMD_AFTER} = 'today'

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #10 on: May 15, 2019, 11:06:47 PM »
Oh, wow!  You are pretty awesome, Gary!

Sorry again about the misunderstanding about it to begin with, I've actually used CMD_AFTER for a wildcard* properly before, just dug it out of the archives to prove I'm just getting old and forgetting things. 

But your custom CMD_WILDCARDKEY is like christmas in July (well, May).  Thank you very much!!

EDIT  -  a preview of the much more sleek and charming looking version using the new token:
Code: [Select]
Set Text [~command] to '{TXTTITLE:"{CMD_WILDCARDKEY}"}' (Trim) (Replace ' ' with '')

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #11 on: May 15, 2019, 11:27:17 PM »
Is {CMD_WILDCARDKEY} not trimmed out of the box?  (Away from my pc at the moment)

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #12 on: May 16, 2019, 01:04:19 AM »
OOh - sorry, I didn't try. 

Yes, it certainly trims spaces, and that use of Trim was redundant in my command. I've removed it.  I still need to replace the space between just so it matches my variables (I love the option, but spaces in variable names is still odd to my eyes ;) )

Code: [Select]
Set Text [~command] to '{TXTTITLE:"{CMD_WILDCARDKEY}"}' (Replace ' ' with '')

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #13 on: May 16, 2019, 01:08:33 PM »
*Not sure if you'll see this, and you may already know, but this beta is crashing a lot.  I'll be using my web browser, VA is listening in the background, I'm not really saying anything, then "crash".  Just FYI.  Cheers!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #14 on: May 16, 2019, 01:19:46 PM »
I'm not aware of the beta crashing a lot.  Are you running any plugins?

Is there any box that shows up when it crashes with details in it?  If not, can you look in your installation directory and see if there is a VoiceAttackFault.txt in there?  If it's not there, look in your .dat folder - usually C:\Users\YOUR USER NAME\AppData\Roaming\VoiceAttack   See if there is anything telling in there.  Feel free to share the contents here.


SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #15 on: May 16, 2019, 02:45:50 PM »
Oh, yea, I am.  A bunch of plugins.

EDDI (3.4.0)
bindED (v1.0) (thanks!!)
VA Text Reader (1.07)
VA Extensions (2.0)

And I fire a command on unrecognized phrases, and it does this:
Code: [Select]
Set small int (condition) [Request_RESPONSE] value to 3

(a leftover from a long time ago from the age of small int's)


And I mention that because since I muted my mic to keep working, it hasn't crashed.  Can't tell if that's coincidence.  I understand that one of these plugins may not be stable with this beta or whatever.  I'm patient, don't mind issues too much.

Nothing in the fault log about this, and it's happened twice since last night - but here's the log anyway.  (I had also reported my second monitor in portrait mode having resizing issues with VA, so there might be useful data in there about that if needed, maybe)


EDIT:  I have disabled plugin support for further monitoring of this issue.  If I keep getting crashes, I will post up.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #16 on: May 16, 2019, 04:21:39 PM »
The latest date in the fault file is May 4th, so, it's not going to be much help (that is, unless your date is wrong on your pc lol).  First thing I would try if disabling EDDI works is to make sure you have the latest version of EDDi.  Next, I would try disabling all the other plugins to see if that helps at all.


SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #17 on: May 17, 2019, 11:00:35 AM »
After disabling all plugins by turning off plugin support, I continued to get random crashes (that also did not add anything to the fault log).

Then I came here and read your last post, so I enabled Plugin support and used plugin manager to disable all but bindED -- had two crashes last night, and when I woke up this morning, VA was not running (crashed during night, no mic input, no significant CPU usage/etc.).  Only change was replacing my VA .exe with the beta(s) you provided, hence my report here.

I've never seen this sort of behavior in the years I've been working with your program.  I hate to report this, but I'd feel bad if I didn't.  Thanks again for everything!

EDIT:  I've now disabled your bindED plugin, so no plugins enabled, restarted VA, and will post up if it keeps crashing randomly.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #18 on: May 17, 2019, 12:49:25 PM »
Very strange - I've been running this beta for days now and I'm not experiencing any crashes with it, and I'm not getting reports from other users that are using it.  I'll run it on my work machine in the background and see if anything happens.

You may want to try downloading it again, in case something got borked up somehow:  http://voiceattack.com/unofficial

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #19 on: May 17, 2019, 07:28:09 PM »
Came back from being away for a few hours (VA had crashed again)

Saw your post, so I deleted the .exe and downloaded again from your link.  Moved it to programs folder, launched, and it had a random crash again inside one hour and twenty minutes.  Wasn't using VA, it was just sitting in the background listening and waiting for commands while I was using my web browser.  Still no change to the fault log.

I'm just reporting what I'm experiencing.  If there ever is anything I can do to help improve VA, just let me know.

The Event Viewer says this, but not sure if it's of any help:
Code: [Select]
(removed)
« Last Edit: May 19, 2019, 12:27:48 PM by SemlerPDX »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #20 on: May 17, 2019, 08:14:19 PM »
Did you have an update to Windows recently?  I've seen the ntdll.dll error before, and it had to do with a faulty ntdll.dll file that VA was accessing.  That is, VA could be accessing a portion of ntdll.dll that is corrupt in some way, OR, VA/VA's components on your system could be corrupt (causing access to ntdll.dll to malfunction).

Here's what I would do -  Reinstall all of the VA beta (not just the single executable):  http://voiceattack.com/betainstaller  Then, get the updated .exe:  http://voiceattack.com/unofficial  Try that for a bit and see if that helps.  Next, I would do a system file scan (actually, you might even want to do this first):  https://support.microsoft.com/en-us/help/4026529/windows-10-using-system-file-checker   This is good to do from time to time.

Either way (VA corrupt/ntdll.dll corrupt), something is off in your setup.  For example, I've been running an instances of the beta + unofficial (mirroring your situation) on one machine since I said earlier, and another version on this machine for the last 4 1/2 - 5 hours without a hiccup.

When you launch VA after a crash, are you presented with the, 'Load Options' screen due to an improper shutdown?

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #21 on: May 17, 2019, 08:51:22 PM »
To answer your question, no I am not presented with the Load Options screen following a VA crash and subsequent manual restart.

So, I've done as you asked, I've backed up and then uninstalled VA through the Win  Add/Remove Program dialog, restarted PC, installed beta through your link, ran it once, closed and replaced .exe with one from your link.  Wanted to get a quick test in, so I just did this quick and I have to go out for a few hours.  I'll try the file checker as you suggest later when I get home, and will note if VA is still running or if it had crashed.

Thanks again for all your help!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #22 on: May 17, 2019, 10:31:49 PM »
Very strange that VA is not presenting the load options screen due to an improper shutdown (crash) - do you have an antivirus that is running or something that is closing the VA process?  The, 'improper shutdown' dialog will show up if VA is not closed properly, but will not show up if, for example, VA is closed from task manager.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #23 on: May 18, 2019, 12:48:34 AM »
No, I'm not running any antivirus and I have nothing that is closing the VA process.  I am running VA as administrator, launching using the following command line parameters:

Code: [Select]
-nofocus -showloadtime -input "*G933*" -command "F_VAC_INPUT_G933"
(I do have voice commands to close VA and restart it with different command lines like that for the various microphones I might be using, webcam "area" mic, or the Oculus Rift, etc.  I have been using these for nearly a year without issue.  Again, nothing changed except my venture into this beta and use of the new token.)

As I view the event viewer, every recent crash of VA was for that ntdll thing, and that started with the use of this beta.  Older event viewer logs for application crashes show various other things like KERNALBASE, etc. Just FYI

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #24 on: May 18, 2019, 01:03:50 AM »
Very, very strange.  With normal VA crashes, you will get an entry in the fault file and a dialog on the next load that would say that VA was not shut down properly.  You may want to roll back to the previous (full) release.  In the meantime, if I'm able to get VA to reproduce this issue, I will certainly make sure it's fixed up.  Is it possible to disable any of the commands that are resetting VA just as a test?

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #25 on: May 18, 2019, 11:26:05 AM »
The commands that are resetting VA would be shortcuts on my start menu with those parameters, and a couple batch files, and the startup command that sets the integer telling VA which mic I've just switched to.  I'll move the batch files & launch shortcuts out of the APPS folder in VA program location, and I'll export and disable my voice commands that close VA and load the batch's.  I'll start VA directly from the .exe in programs folder and see how it goes today.

Will all future full release versions of VA need to interact with that ntdll thing?  Cuz that would mean that only my older version would be safe from crashes resulting from errors with the ntdll thing.  And it could be an issue specific to my system and you may not be able to reproduce it.

Why is this beta trying to do something with that ntdll and not my older version?  So odd...

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #26 on: May 18, 2019, 12:15:28 PM »
Ntdll.dll is a core Windows component, and getting around NOT using ntdll.dll will be virtually impossible.  VA accessing ntdll.dll is not a new development, however, there could be new code in VA that is accessing an aspect of that component (or another dependent component) in a way that it has not before - which could be exposing a system issue. 

How frequent is the ntdll.dll message in your event log?  Do they coincide with VA's disappearance?  Plugins that run in VA's address space will need to access ntdll.dll at times as well, so, we want to rule out that the ntdll.dll problem that's in the event log is not originating from an earlier problem from a plugin, or an anomaly-type situation that doesn't regularly occur.

Here is a link to some more information about ntdll.dll and ways to possibly fix problems with it:  https://www.lifewire.com/how-to-fix-ntdll-dll-errors-2624474

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #27 on: May 18, 2019, 04:45:32 PM »
Thank again! Will read up on that link.

The messages in my event log only coincide with VA crashes, and these have been occurring sporadically once inside spans of 2-8 hours.  I don't see any other event logs that reference that .dll

I'm glad something got pointed out to me by VA! I consider it a good thing, now I can work on fixing that.  I knew I had some sort of Windows error a long time ago, it was during some update many many months ago, and I figured it fixed itself as I've moved on and nothing ever had any issues... Perhaps this is related to that event way back when...

Either way, I would tend to assume it is my system and not your program that is to blame.  You can't account for people with janky messed up systems like mine, no worries.  I'll get it ship shape before long, will probably backup everything in case Windows gets FUBAR in the process.  Cheers!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #28 on: May 18, 2019, 04:49:53 PM »
Did you try the system scan?

https://support.microsoft.com/en-us/help/929833/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system

It may be able to get you back up to speed (or not - either way, it doesn't take too long ;)).

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: [v1.7.5] CMD_AFTER Wildcard Token returning blank? CMD_BEFORE typos?
« Reply #29 on: May 18, 2019, 05:11:41 PM »
not yet - this is only because I ordered a 256GB class 10 USB flash drive, and I'm gonna use it as my new system restore media.  Once it gets here, I'll backup the OS drives (RAID-0 SSD's) and get to fixin Windows 10.

I have a bunch of things I'm working on for VG this weekend, so I don't want any accidental downtime.  And watch, after being this careful, when I actually run it, it'll fix my Win10 bing-bang-boom no issues.  Still, been tinkering since C64, and just don't trust these devil boxes ;)

I will update with progress report next week after it's done.  Thanks again for your time and patience!! Cheers!