Detect illegal configuration for a swich parameter in a command?

I have a command with multiple parameters, one of them configured as a switch /S in the template.
Falsely assigning a value to this parameter (eg. MYSWITCH=42 of MYSWITCH false) when setting up a button seems to annoy DOpus so much that all parameters for that command are completely ignored; the argsmap is left barren.

Is there a way for the script to detect this state of annoyance so the user can be warned?

(I'm running version 13.6.2.)

Thank you!

Giving a parameter to a switch argument is invalid, so the command line may not parse at all.

You could make the argument /O instead of /S, and then check that it's on but not set to anything. But there will always be other ways someone could pass invalid arguments, and you can only do so much to help if someone does random things.

1 Like