Skip to content

Instantly share code, notes, and snippets.

@Lillecarl
Forked from anonymous/WirelessBeep.rsc
Created January 8, 2016 07:19
Show Gist options
  • Save Lillecarl/bd640ebdb9113d21ed27 to your computer and use it in GitHub Desktop.
Save Lillecarl/bd640ebdb9113d21ed27 to your computer and use it in GitHub Desktop.
: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;
}
}
:set ConnCount0 $ConnCount1
@Lillecarl
Copy link
Author

This should run every 1 second for best effect. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment