ASK [reset-button]

i got hEX S
im wondering does anyone have any useful script for

/system routerboard reset-button ?

Would you consider this to be useful?
Mode botton with multiple presses

I don’t understand, what should the script do ?

This is part of my RouterOS Scripts collection. You can make the device act on multiple presses on mode or reset button. The default is one press to toggle dark mode, two presses for a “Hello World” notification, three presses for shutdown, … But you can make it do what ever you want.

i want to enable/disable interface on CAPsMAN interface using /system routerboard reset-button.
@eworm is there any further help about this?

Using my scripts add something like this in configuration:

:global ModeButton {
  1="/ caps-man interface disable [ find ];";
  2="/ caps-man interface enable [ find ];";
}

With one press all interfaces are disabled, with two presses interfaces are enabled. Is that what you want?

Of course you could script a simple toggle without my scripts.

yess,would be able to correct that one


:global ModeButton { [/caps-man interface get [find name=“cap1”] disabled];
:if (gueststate = yes) do={
:log info “enabled”
/caps-man interface disable [ find name=cap1 ];
:log info “disabled”
/caps-man interface enable [ find name=cap1 ];
}

No idea what you code is supposed to do.
Do you want to toggle the interface without my scripts? Use something like this then:

:if ([ / caps-man interface get cap1 disabled ] = true) do={
  :log info "Enabling...";
  / caps-man interface enable cap1;
} else={
  :log info "Disabling...";
  / caps-man interface disable cap1;
}

that i was looking for