Hello Gary. I'm programming some nice little plugin thingy and I'm in terrible need of spying the executed commands from within the plugin :3 No shady business here, I would just want to keep track of last used commands to do some fancy magic with it. After asking around on the forums we've come to conclusion that there are two more things I would need to achieve this:
- {LASTCMD} token, which would let me check if the same command has been used recently, regardless of spoken segment options. It would work the same as {LASTSPOKENCMD}, except that it would contain the whole "when I say" string
- {CMDCOUNT} token - an integer that would keep track of how many commands were executed since the start of VA. (Thanks Pfeil for this suggestion!)
The CMDCOUNT is just one option to get what I really need, which is to detect a command execution. Another idea I've come up with is a boolean token that would return true as long as the command is being executed, I don't know what would be more versatile and useful in general.
I just need a way for the plugin to tell that a new command is being executed, so I can store it in database, with the date it was used, and maybe also some cmd category or whatever. If you're interested in why I need this, I tried to explain it in
this wall of text.Maybe you have a better idea how could this be done?
Would it be possible to implement those two things? Or at least the second token?