Attached is a little program I created with some help from the thread Tomos referred to, and Nod5's response there.
The code is below if you need. The exe file in the rar would do the task if you put it in the start-up folder.
; announces capslock and numlock state when pressed.
~Capslock::
{
SoundGet, MasterBeforeMaximize, Master ; set volume to an audible level, in case it was too low
SoundGet, WaveBeforeMaximize, Wave ; Don't be rude and get the original volume levels before changing them
SoundSet, 50, Master
SoundSet, 50, Wave
If GetKeyState("CapsLock", "T") = 1
{
ComObjCreate("SAPI.SpVoice").Speak("caps on")
Return
}
Else
{
ComObjCreate("SAPI.SpVoice").Speak("caps off")
Return
}
SoundSet, %MasterBeforeMaximize%, Master ; Restore original volume levels
SoundSet, %WaveBeforeMaximize%, Wave
}
Return
~Numlock::
{
SoundGet, MasterBeforeMaximize, Master ; set volume to an audible level, in case it was too low
SoundGet, WaveBeforeMaximize, Wave ; Don't be rude and get the original volume levels before changing them
SoundSet, 50, Master
SoundSet, 50, Wave
If GetKeyState("NumLock", "T") = 1
{
ComObjCreate("SAPI.SpVoice").Speak("num on")
Return
}
Else
{
ComObjCreate("SAPI.SpVoice").Speak("num off")
Return
}
SoundSet, %MasterBeforeMaximize%, Master ; Restore original volume levels
SoundSet, %WaveBeforeMaximize%, Wave
}
Return