It isn’t that easy to hear the RouterBoard speaker in most cases, so I came up with a simple alarm that does a much better job at getting your attention.
:for a from=1 to=10 step=1 do={
:local b 4000
:for c from=1 to=50 step=1 do={
:beep length=10ms frequency=$b
:set b ($b - 40)
}
}
The upper value in the first for loop can be adjusted for duration.
Your script does not work correctly from RouterOS 5.x and up.
The following alarm script gives me attention.
:for i from=1 to=3 step=1 do={
:beep frequency=550 length=494ms
:delay 494ms
:beep frequency=400 length=494ms
:delay 494ms
}
I use this script when something is good, such as when a connection changes state from disconnected to connected.
:local T 784,300ms,1047,300ms,262,150ms,1047,150ms,1319,300ms,784,300ms,1047,300ms,262,150ms,392,150ms,1047,150ms,523,150ms,1319,150ms,392,150ms,1175,300ms,294,150ms,1175,150ms,1047,300ms,988,300ms,1047,300ms
:for C from=0 to=(([:len $T]/2)-1)
do={:beep frequency=[:pick $T ($C2)]
length=[:pick $T (($C2)+1)]; :delay [:pick $T (($C*2)+1)]}