Help with AddCommand() template /S please

Am trying to set up a command template /S argument.

Calling it like this

BackgroundChanger RECURSIVE=on
or
BackgroundChanger RECURSIVE=true

is not working when using something like

if (clickData.func.args.got_arg.RECURSIVE.exists)
or
if (clickData.func.args.got_arg.RECURSIVE.value)
or
if (clickData.func.args.got_arg.RECURSIVE)
{
	log(1, 'RECURSIVE EXISTS');
}
else
{
	log(1, 'RECURSIVE NOT EXISTS');
}

All help appreciated.

If it's /S then it doesn't take any arguments, the presence of the keyword itself is enough.

BackgroundChanger RECURSIVE

/S stands for switch, so either it is present or not (equals to got_arg.RECURSIVE). If you want to have "RECURSIVE=someothervalue" or as switch then you declare it as optional /O as described in the documentation and here.