Is your feature request related to a problem? Please describe.
I often use the 'Windows Utils -> Command line command' action, and save output (representing whether the command succeeded or failed) to variable to be used afterwards.
But the command window appearing is annoying, so I usually set another variable beforehand to determine if I really need to run the command or just skip it.
Now the problem is, since I can't set the default value for the output variable, whenever Macro Deck determines to skip the command, the output variable is not set, meaning its values are not changed from the last run.
Reference: #82
The variables which are created by plugins are read-only. You can display them on action buttons or use them in conditions.
So I would have to set multiple conditions for the subsequent actions; (A) whether the command was skipped or not, and (B) whether the command succeeded or not. This is very frustrating, because I cannot simply use multiple variables for conditions.
Describe the solution you'd like
It would be nice to have an 'AND / OR' operator for multiple conditions, or maybe just allowing nested conditions.
Nested conditions should be almost equivalent to the 'AND' operator, and that will take care of the 'OR' operator as well, since 'A or B' is equal to 'not (not A and not B)'.
Describe alternatives you've considered
As an alternative to solve the problem described above, allowing to change variables created by plugins would be fine, for instance:
- Change the output variable to 'Skipped' as a default
- Condition to execute command or skip it
- If the Command executes, the results 'Succeeded' or 'Failed' is overwritten to the output variable
So the output variable ends up with 3 states; 'Succeeded, Failed, or Skipped'
Actually I've done this as a workaround, bypassing restrictions mentioned above in #82
Procedure:
- In the 'Global variables' pane, delete the variable created by the Windows Utils plugin
- Create a user defined variable with the same name
- Go back to the main pane and select the button
- Create 'Macro Deck variables -> Change variable value' action and set the user defined variable created in step 2
- In the 'Windows Utils -> Command line command' action, save output variable with the same name
By this way, default output variable can be set, and whenever the command executes, the output variable would be overwritten by the plugin.
Problem remaining is:
I would have to delete the variable again to reset actions. Also, I assume that there is some reason not allowing to change plugin-created-variables, so the workaround might not be supported in the future.
Additional context
None.