Enabling and disabling buttons depending on context

I noticed that DOpus dynamically controls the behavior of buttons:

A button with the code Set DUAL=Toggle get's a grey backdrop as long as Dual-Mode is enabled, otherwise it has not backdrop.

If I add the code Clipboard COPYNAMES to a button, it is getting disabled as long as there is no selection.

Is there any way to control this behavior? E.g. to disable a button if the selection is not a file? Or a folder? And so on...

You could try to include @filesonly or @dironly in your commands.

Hmm. This prevents the command from being executed, but doesn't disable the button...

Code used:
@filesonly "C:\Program Files (x86)\Notepad++\notepad++.exe" {filepath}

Am I doint it wrong?

This stuff is done automatically by Opus when it can work it out for certain commands, but that's about it.

You you disable or reverse the "pushed-in button" effect that some commands get but there's no way to make a button that is visually disabled unless certain conditions are met (unless it's a command that Opus knows how to do that for automatically).