Dynamic Button on Toolbar no longer working

Networking On

@admin
@toggle:update
@runmode:hide
@icon:/hostpictures/Icons/Button Icons/Networking/Network on5.ico#0,=IsSet("$glob:ethernet")
@set glob!:ethernet=true
netsh interface set interface "Ethernet" admin=enable

Networking Off

@admin
@toggle:update
@runmode:hide
@icon:/hostpictures/Icons/Button Icons/Networking/Network off5.ico#0,=!IsSet("$glob:ethernet")
@set glob!:ethernet
netsh interface set interface "Ethernet" admin=disable

I had both of these installed into buttons that I had on a Dynamic Button on my toolbar, and I'm not certain what changed but the icons are no longer showing refelcting the state of the network as I toggle back and forth. Did something change in a beta update regarding these dynamic folders? Just want to get the button working again. Any help would be appreciated. Thank you all.

Internal icons still work fine:

@admin
@toggle:update
@runmode:hide
@icon:8ball,=IsSet("$glob:ethernet")
@set glob!:ethernet=true
@admin
@toggle:update
@runmode:hide
@icon:closetoolbar,=!IsSet("$glob:ethernet")
@set glob!:ethernet

Use this script to make .dis files for internal icons.

when you say internal icons, are those the ones that come with DOpus? I must use those in order to get dynamic buttons to work? I read all over the help file for what I could find about dynamic buttons but it didn't mention that requirement at all, unless I completely glanced over it. Makes sense I suppose because I never tried those images, I only used my own images/icons that I had made myself.

Once I make my own icons into internals using your script, that will make my own images available to use?

Nope, spoke too soon. Even using the internal icons, the dynamic button only shows a blank icon. I dont know what I'm doing wrong here.

image

If you paste /hostpictures/Icons/Button Icons/Networking/Network on5.ico into the path field and push return, does it find and select the icon?

No, it wasnt working when i put those into the address bar. So now I am using "mapnetworkdrive" and "disconnectnetworkdrive" images. I am using a three way button. marked as dynamic. When i right click, it is disconnected, when left, it connects. But now I'm just getting a smiley face.

Maybe I'm not giving enough information for you guys to understand what I'm doing wrong.
Setup:
One three way button on my toolbar. It is marked as dynamic in the edit menu. I have one of the buttons from the first post as the left click (to connect) and the other button as right click (to disconnect). I have the connect button using the "mapnetworkdrive" image from the internal opus set. and I have the disconnect button on the right click using the "disconnectnetworkdrive" image from the internal icon set.
Is this the appropriate setup ? I just want the button to reflect the status of the network. So if I right click, it will show "disconnectnetworkdrive" image until I left click, where it will then show "mapnetworkdrive" image.

So the icon you were specifying didn’t exist? That would explain why it didn’t work.

I have since changed it to internal pictures and it still isn't working. Is my setup correct that I explained above? "I kind of assumed that you would want me to have properly placed pictures and have them in their proper directories, so I resolved that. What else am I doing wrong?

Go into Customize mode, copy the following text (all of it) and paste it onto a toolbar (right-click on an empty spot and choose Paste from the menu).

<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none" type="three_button" use_child_icons="yes">
	<label>Network</label>
	<icon1>#newcommand</icon1>
	<button backcol="none" display="both" label_pos="right" textcol="none">
		<label>On</label>
		<icon1>#newcommand</icon1>
		<function type="normal">
			<instruction>@icon:8ball,=IsSet(&quot;$glob:ethernet&quot;)</instruction>
			<instruction>@set glob!:ethernet=true</instruction>
			<instruction>@toggle:update</instruction>
		</function>
	</button>
	<button backcol="none" display="both" label_pos="right" textcol="none">
		<label>Off</label>
		<icon1>#newcommand</icon1>
		<function type="normal">
			<instruction>@icon:closetoolbar,=!IsSet(&quot;$glob:ethernet&quot;)</instruction>
			<instruction>@set glob!:ethernet</instruction>
			<instruction>@toggle:update</instruction>
		</function>
	</button>
</button>

Then exit Customize mode, and try clicking it with left and right buttons. Does it change image for you?

Yes, Jon Thank you so much for your help. I have been struggling with the dynamic button thing, and haven't figured them out yet. Thank you for your help once again!

<icon1>#newcommand</icon1>
		<function type="normal">
			<instruction>@admin</instruction>
			<instruction>@toggle:update</instruction>
			<instruction>@runmode:hide</instruction>
			<instruction>@icon:networkdrive,=IsSet("$glob:ethernet")</instruction>
			<instruction>@set glob!:ethernet=true</instruction>
			<instruction>netsh interface set interface "Ethernet" admin=enable</instruction>
		</function>
	</button>
	<button backcol="none" display="both" label_pos="right" textcol="none">
		<label>Off</label>
		<icon1>#newcommand</icon1>
		<function type="normal">
			<instruction>@admin</instruction>
			<instruction>@toggle:update</instruction>
			<instruction>@runmode:hide</instruction>
			<instruction>@icon:disconnectnetworkdrive,=IsSet("$glob:ethernet")</instruction>
			<instruction>@set glob!:ethernet</instruction>
			<instruction>netsh interface set interface "Ethernet" admin=disable</instruction>
		</function>
	</button>
</button>

I had to add the couple lines for the commands to work for some reason, but now everything works properly. Thank you Jon again for your help. Above is the exact code I used if anyone is interested.