Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Caps Lock alarm
#1
I have written this macro, that starts whenever I press the CapsLock key:

int wasoff=CapsLock(0)
if(wasoff)
CapsLock 0
shutdown -2
else CapsLock 1
mac "Beep"


And here is the function "Beep", that is called by the aforesaid macro:

start
bee "C:\Windows\Media\Windows Ding.wav"
wait 1
bee "C:\Windows\Media\Windows Ding.wav"
wait 1
goto start

So, whenever CapsLock is on, a repeating sound alerts me, similar to the sound that is activated in cars by the turn signal.
But I see that my macro is really coarse. Is there a simpler way to obtain the same result?
#2
How's this?

Code:
Copy      Help
rep
ifk(K 1)
    out "caps is on"
     start
    bee "C:\Windows\Media\Windows Ding.wav"; 1
    goto start


Forum Jump:


Users browsing this thread: 1 Guest(s)