Author Topic: "Unable to execute command. Command not available." when including other profile  (Read 5116 times)

SpaceGecko

  • Guest
Voice Attack v1.7 - Steam

Profile A has a few commands.  Under the Profile Options / Profile General tab, I have included Profile B and Profile C.  Profile A has some identical commands (and key bindings, since I couldn't add the commands without the keybindings) found in Profile C, but they are changed to point to a custom voice response.

When I call for a command in Profile A that exists in Profile C, I receive

    Recognized : '<command>' (referenced)

and then

    UNABLE TO EXECUTE COMMAND. COMMAND NOT AVAILABLE.


If I load Profile C, the command executes correctly.


The command in Profile C does an "Execute command" to a command that does the actual key press.

Thoughts as to what is creating the errors?  Am I not understanding how the included commands from other profiles works?

Thanks!



Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Did you copy the contents of the original command into your own profile?

Without seeing the actual commands, from what you're describing it looks like you're using the action out of the command from profile C in the command in profile A.
Because "Execute Another Command" commands are referenced by their internal, profile specific ID, this will result in the command not existing from the perspective of profile A.


If this is the case, I don't know how you managed to do so; If you try to copy a command which contains such a reference to another profile, you'll actually get a message telling you that this is not possible, and pasting is supposed to be disabled when it contains a referencing action.

Did you import profile C initially as the template for profile A and remove the commands you didn't need?


Either way, if you want to call a command in another profile, you need to use the "Execute by name (Advanced)" option of the "Execute Another Command" action.

SpaceGecko

  • Guest
I didn't copy or import any commands - I created a brand new Profile A and then manually typed in the identical commands (only 2) that I wanted from Profile C, with the only changes being the location of the sound file that is used.

Using the "Execute by name (Advanced)" option makes sense now.  I will try that this evening and let you know.

Thanks!

SpaceGecko

  • Guest
Getting closer, I think.  I did start tests with "Execute by name (advanced)", but now my computer seems to have lost my voice training and doesn't want to understand me again.  I will try more testing after going through training (again).

I now understand from your reply that any command that is copied from another profile keeps the original GUID.  Can the command's GUID within a profile ever be changed?  If I were to:

   1) Copy a command (e.g. "Fire weapon") from Profile X to Profile Y
   2) DUPLICATE the copied command in Profile Y by slightly changing the command (e.g. "Fire weapon (temp)")
   3) Delete the copied command ("Fire weapon") in Profile Y
   4) Change the DUPLICATED command back to the original value in Profile Y (e.g. "Fire weapon (temp)" to "Fire weapon")

then I am left with identical commands in the two profiles, except they now have unique GUIDs within their own profiles, and then I could still reference each command uniquely within their profiles even though they have the same names?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
I now understand from your reply that any command that is copied from another profile keeps the original GUID.  Can the command's GUID within a profile ever be changed?
Ah, no. I was speculating that the reference to a GUID may not have changed in the "Execute Another Command" action.

As far as I'm aware GUIDs are changed when commands are copied or exported(References are kept as matching pairs, but if you were to export them individually and re-import them, the referenced command will not be found).


Doing some experimenting, I believe I've replicated what's happened in your profile:

The "Execute Another Command" action should execute the command referenced in its own profile when that profile is included into another, however, if the same command *name* exists in a profile above it(in the included profile hierarchy), the command will throw "UNABLE TO EXECUTE COMMAND. COMMAND NOT AVAILABLE.".


E.G.

If you have three profiles,

Profile A
Profile B
Profile C

A is the top profile in the hierarchy, B and C are included in the order shown.

Each contains a calling command(named differently).

If C contains the referenced command and C's calling command is executed, the referenced command will execute

If B and C contains the referenced command, executing C's calling command will result in the "NOT AVAILABLE" error; If B's calling command is executed, B's referenced command will execute.

If A, B, and C contain the referenced command, executing B or C's calling command will result in the "NOT AVAILABLE" error, executing A's calling command will execute A's referenced command.


I don't know if there is a technical limitation causing it, but it doesn't seem right. Only Gary knows for sure.