Hotspot Button with Button Highlighting Toggled

From time to time I use a third party Wi-Fi Hotspot software from Connectify Inc.
I made a command line button to turn it on and off and would like to be able to toggle the button highlighting as it is easy to forget I have it on.

Leaving it on accidentally causes problems with my phone as I live in a rural area where Satellite Internet is the only option above ancient phone line DSL.
I don't have Starlink yet as I need to go 175 ft ( over 50 meters ) to get a clear view of the southern sky.

Here's what I have with my attempts at the toggle commented out.
Any help is appreciated !

@runmode hide
//@toggle:if $globa!:foobar
@if:$glob!:foobar
@set glob!:foobar
"C:\Program Files (x86)\Connectify\Connectify.exe" connectify://hide
"C:\Program Files (x86)\Connectify\connectify_cli.exe" stop
@if:else
@set glob!:foobar=on
"C:\Program Files (x86)\Connectify\Connectify.exe" connectify://show
"C:\Program Files (x86)\Connectify\connectify_cli.exe" start
//@toggle:invert

This seems to work:

@toggle:if $glob:foobar
@if:$glob:foobar
@set glob!:foobar
dopusrt /argsmsgbox Stop
@if:else
@set glob!:foobar=1
dopusrt /argsmsgbox Start

Thanks Much !
You stirred the kettle enough to get me trying a few other things.
I made an alias for C:\Program Files (x86)\Connectify and named it Hotspot at least for now.
I then made two user commands that I named Hotspot_On and Hotspot_Off .

Hotspot_Off

@runmode hide
/Hotspot\Connectify.exe connectify://hide
/Hotspot\connectify_cli.exe stop

Hotspot_On

@runmode hide
/Hotspot\Connectify.exe connectify://show
/Hotspot\connectify_cli.exe start

With that, the button highlight toggle then worked.

@toggle:if $glob:foobar
@if:$glob:foobar
@set glob!:foobar
Hotspot_Off
@if:else
@set glob!:foobar=1
Hotspot_On

Thanks !

Now that I have this working, with some hindsight I think that it may be better to define User Commands for each executable. This way, I could use the Dopus built in Template Switches Option. It also makes more sense for future uses of these User Commands.

I'll think on it and post tomorrow a hopefully better version of the answer to this.

I kept the alias I made.

/Hotspot points to  C:\Program Files (x86)\Connectify 

I made two User Commands, Connectify_Hotspot_GUI and Connectify_Hotspot_CLI

Connectify_Hotspot_GUI
Connectify_Hotspot_CLI

The button code is then this:

@toggle:if $glob:foobar
@if:$glob:foobar
@set glob!:foobar
Connectify_Hotspot_GUI GUI_RUN=hide 
Connectify_Hotspot_CLI CLI_RUN=stop 
@if:else
@set glob!:foobar=1
Connectify_Hotspot_GUI GUI_RUN=show 
Connectify_Hotspot_CLI CLI_RUN=start 

This works and I think it is a better answer.