Author Topic: [v1.7.3.5] SetCommandSessionEnabled() issues  (Read 1856 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
[v1.7.3.5] SetCommandSessionEnabled() issues
« on: March 12, 2019, 02:15:38 PM »
SetCommandSessionEnabled() appears to disable a specific command phrase, not the command that phrase is attached to.
This means if a command has multiple phrases or dynamic command segments, only the specifically disabled phrase will be stopped from executing, even when the command is triggered by something other than speech.
E.G. if a command has the "When I say" value "this is a [command;test]", disabling the phrase "this is a test" means speaking "this is a command" still executes the command, and using a shortcut assigned to that command will also trigger it.
If "this is a command" is disabled instead, speaking "this is a test" will execute the command, but using the shortcut will not.

This also applies to "Execute Another Command"; If the "Execute selected command" option is used, the command will still execute if "this is a test" is disabled", but not if "this is a command" is disabled.
When using the "Execute by name (Advanced)" option, it works as if the command was spoken, I.E. the disabled phrase is disabled, but the other still works.
The latter also applies to the "executeCommand()" method.


The "Execute" item in the command list context menu will work regardless of a command being disabled(which may be on purpose but is not documented).


When the profile is edited(E.G. modifying a command and using the "Apply" button, or modifying a command setting and using the "Done" button), all disabled commands are enabled again.


EDIT: Fixed in v1.7.3.8
« Last Edit: March 16, 2019, 11:01:26 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: [v1.7.3.5] SetCommandSessionEnabled() issues
« Reply #1 on: March 12, 2019, 09:14:07 PM »
Ah, yes.  I was selecting on the wrong id.  Changing to the proper id seems to have fixed everything but the edit clearing issue - I'll dig into that one (should be easy to fix).

Edit - turns out the executing by right click is supposed to be that way (it's excluded).  I'll add a blurb to the help doc. The profile edit no longer clears the list.

Thanks again, bud ;)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: [v1.7.3.5] SetCommandSessionEnabled() issues
« Reply #2 on: March 15, 2019, 02:10:16 PM »
Seems to be working well in v1.7.3.6, however I did notice when executing a command using the "Execute selected command" option of the "Execute Another Command" action, the message no longer states the command name("Command '' is currently disabled for this session and was not executed."), though the "Execute by name (Advanced)" option does.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: [v1.7.3.5] SetCommandSessionEnabled() issues
« Reply #3 on: March 15, 2019, 11:19:11 PM »
Ah!  I see what you're saying there.

Looks like it's fixed up.  For speed, it's not going to pick the command string apart to display a single command if the command is multipart/dynamic.  Just a heads-up


Thanks for the feedback!