Beep when someone connects to Wi-Fi

Well i thought i’d share this script, all it does is make an upwards beep when someone connects and a downwards one when someone disconnects, should be run somewhere between once every 1-5s

:global ConnCount0

:if ([:typeof $ConnCount0] = "nothing") do={
    :set ConnCount0 0
}

:local ConnCount1 0
:foreach i in=[/interface wireless registration-table find] do={ :set ConnCount1 ($ConnCount1 + 1) }

:if ($ConnCount0 < $ConnCount1) do={
    #/log info "Wireless connections increased"

    :for i from=800 to=2000 step=100 do={
        :beep frequency=$i length=11ms;
        :delay 11ms;
    }
}
:if ($ConnCount1 < $ConnCount0) do={
    #/log info "Wireless connections decreased"

    :for i from=2000 to=50 step=-100 do={
        :beep frequency=$i length=11ms;
        :delay 11ms;
    }
}

#/log info "ConnCount0 $ConnCount0 ConnCount1 $ConnCount1"
:set ConnCount0 $ConnCount1

Have fun! :slight_smile: