Unless there is a property in
WMI that I couldn't find (quickly) to detect the state of the CapsLock key, then the only methods I know of require a Windows API call - which tidy just told you would require a dll call, with the dll just being a wrapper for that one API call.
Changing its state from within mIRC is very simple, but detecting its current state is not.
alias Toggle.CapsLock {
- .comopen WSH WScript.Shell
!.echo -q $com(WSH, SendKeys, 1, *bstr, {CAPSLOCK})
.comclose WSH
}
/Toggle.CapsLockI thought of using SendKeys to send
[color:FF6666]a[/color] to a @window and then examining the contents of its $editbox(@window) to see if it ===
[color:FF6666]a[/color] or ===
[color:FF6666]A[/color], but it will just send what you tell it to send; even if you try using the Shift key (+) to send
[color:FF6666]+a[/color], you'll still just get an
[color:FF6666]A[/color], regardless of the current setting of the CapsLock key. The same holds true for sending
[color:FF6666]a{CAPSLOCK}a[/color]: you'll always get
[color:FF6666]aA[/color] in the editbox.
So, unless there is either a $dll call or a $com object you can access, you're out of luck.