Disable button if Clipboard is Empty

Is there a command modifier to disable a button or a Context Menu item if the Clipboard is Empty?
I have tried this @disableif:!clipboard but it didn't work.


Not currently, at least.

You can make it so a button won't do anything when clicked if the clipboard is empty, but not disable it ahead of time.

(It's also quite rare that the clipboard is really empty. There's usually something in it, unless you've just rebooted, even if it's not something the button would make use of.)

Since there is no direct command to have information about the clipboard as per your answer I can deal with it differently without needing the information if the clipboard is empty or not. So I would like to know if there is a command to just disable a button or a context menu item. Because the @disableif is an if statement is there a simple @disable button command?

If there is a command to disable a button, what I need is actually to have a command to disable a button that is not internal to the button code. Is it possible at all to SEND a command to a SPECIFIC button to disable/enable itself (maybe by a hotkey for example)
Just to make it clear: I will have two buttons button A and button B. Button A will send a hotkey to button B to disable/enable itself. Is it feasible?


You can use variables to enable/disable or show/hide buttons. e.g.:


Variables can be set via scripts, or using the @set modifier.

This sets the variable to something (it doesn't matter what if it's just being used with @disableif):

@set glob:MyVar=Anything

This deletes it again:

@set glob:MyVar

The @toggle:update line in the 2nd and 3rd commands is needed to make the first button update in reaction to the change.

It semms that this solution would be sufficient for what I need to implement.
Thank you