Hide a toolbar button if a corresponding drive is not present

This question isn't about the drive buttons that Opus can create, it's more general than that.

I've got a bunch of buttons I've created manually for my drives: left-click opens the root, right either opens a menu containing recent/frequent/specific locations (for a hard drive) or opens the drawer for an optical drive. I've also got a couple of simpler buttons for my usual flash drive and external backup: they're single function, with a left click opening the root. A final button uses the command "Go DRIVEBUTTONS=-cdefghxy,hideempty" to show any additional drives as and when they are connected.

I would like the two simple buttons to disappear when the appropriate drives aren't connected. I don't want the DRIVEBUTTONS button to manage them, even though my current buttons don't provide any extra functionality, because I want them to have unique icons that I've created.

Is there any way to flag a toolbar button to hide itself when a particular drive is not mounted? I'm guessing that there isn't, unless it's possible using scripting. Alternatively, is there a way to make a DRIVEBUTTONS button show a specific icon for a particular drive rather than its default icon? That'd do it for me too, I think.

For reference, here's one of the buttons I want to autohide:

<?xml version="1.0"?>
<button display="icon" label_pos="left">
	<label>X</label>
	<icon1>#NJM_MiscIcon_V1.1:USB-X</icon1>
	<function type="normal">
		<instruction>go x:\</instruction>
	</function>
</button>

Thanks in advance.

If it's just about the icons, you can override the icons for drives using either a .ini file on the drive itself or the registry. The registry method is described here:

Great, thanks. I'll give that a go.

Knocked up a .ico file, tweaked the arguments on the drive button and it works a treat. Thanks, Leo.