Author Topic: Is there any way to enumerate commands/categories of a profile?  (Read 3603 times)

ExternalCommand

  • Newbie
  • *
  • Posts: 5
Is there any way to enumerate commands/categories of a profile?
« on: January 28, 2020, 01:51:39 PM »
I just want to make sure I'm not missing something but is there any way to enumerate all commands/categories in a profile?
I see ProfileNames() - Returns a string array of all profile names. Is there any equivalent of a CommandNames() or CategoryNames() ?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Is there any way to enumerate commands/categories of a profile?
« Reply #1 on: January 28, 2020, 02:07:14 PM »
There is not, no. How would you intend to use such methods?

ExternalCommand

  • Newbie
  • *
  • Posts: 5
Re: Is there any way to enumerate commands/categories of a profile?
« Reply #2 on: January 28, 2020, 04:27:56 PM »
At the moment its more of an exploration of ancillary ideas. I've already done this the long way but maintenance could be less tedious. The premise is nothing special. A profile with a large amount of commands logically categorized. Memorizing all is always a chore, sometimes futile. My idea was instead of using exported lists for reference or alt-tabbing to view the profile I would leverage VA itself to help as dynamically as I could manage. Think of it as part of a profile help framework of sorts.

Taking a game as an example, there may be a On-Foot and In-Vehicle category. I would like to ask "List On Foot Commands" for Text-to-Speech output. "Show On Foot Commands" to invoke dialog box with optional numbered choices like Windows Speech Recognition does. I can think of 3 main ways to do this:

  • Create a "List <category> commands" command, and manually enter and adjust all entries as needed. Tedious to maintain regardless of how you do it
  • Create a "List <category> commands" command. Enumerate all commands with inline function during profile load and build cmd list string variable per category.
  • Export profile as .vax file and parse via inline function

I would still have to manually manage categories' trigger command but this would greatly alleviate the bulk of the profile maintenance. I may eventually just go the .vax file route since it opens up the possibility of generating more pseudo dynamic craziness.




Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Is there any way to enumerate commands/categories of a profile?
« Reply #3 on: February 03, 2020, 10:22:15 PM »
You are welcome to submit that idea for possible future implementation @ExternalCommand