Status indicator of a button

Some buttons like flatview, hidden files,... have a status indicator when active (looking "pressed").

Can it be used in usercommands also?

Depends what you mean exactly.

Can you give an example of what you want?

For example I have two separate buttons for activating and deactivating network (no toggle) - it would be useful to megre them into one button and see the state. This could be by looking pressed like DO or changing the icon (like an on/off button).

I remember people asking for such an option here a few weeks ago - if not possible, I would like to send a FR "button state" or "button selector".

No, you can't do that.

It only works for things Opus already knows a) how to set or toggle; b) how to detect the current state of. Opus doesn't have commands for activating/deactivating network adapters.

If you want a toggle button, it could be done with some VBScript, but Opus still would not indicate the current state and giving it the ability to query (and respond to changes in) the state of arbitrary things would be a non-trivial thing to add, and a very open-ended problem. (The only real, general way to solve it would be allowing plugin code to do that kind of thing, but very few people seem to have the skills and interest-level to write plugins, so that seems like a waste of time.)

DO can't and doesn't need to verify state of external commands, but could simply indicate if a button was pressed or not. On the other side the state maybe needs to be remembered after DO was closed or similar... what makes it difficult I think.

A second idea was a bar like the thumbnail-size for e.g. volume - but also here problem which value to use after restarting DO.

Damn!

In your network example, if you connected/disconnected the network adapter in any other way (via the network control panel, the connection dropping by itself, rebooting the computer...) then the button state would become wrong. So that wouldn't work very well. You'd need custom code which queried the network adapter state, or hooks into something that can wrap a lot of different things, like WMI.