Jump to content

Can't shut down CapsLock


Recommended Posts

I use  

Send("{CapsLock off}")

I just started writing a script, and immediately faced a problem. I need to turn off CapsLock key. I can not shut off CapsLock button. Try it - the button LED will  flash, but it sure as Hell won't turn off. Ive tried everything. So how do I shut the damned thing on or off? It's either beyond my current skills, or I missed something.

 

 

Link to comment
Share on other sites

or set option at start of script..

Opt("SendCapslockMode", 0) ;1=store and restore, 0=don't

then your send capslock on/off/toggle will work

If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

Link to comment
Share on other sites

31 minutes ago, alienclone said:

or set option at start of script..

Opt("SendCapslockMode", 0) ;1=store and restore, 0=don't

then your send capslock on/off/toggle will work

Your method worked like a charm, thank you very much. And thank you, badcoder123 that was a really neat small piece of code.!

Link to comment
Share on other sites

44 minutes ago, supraspecies said:

 

#include <WinAPIvkeysConstants.au3>
#include <WinAPISys.au3>
Opt("SendCapslockMode", 0)

Send("{CapsLock}")
$_Status = _WinAPI_GetKeyState($VK_CAPITAL)
ConsoleWrite($_Status)

This will tell you if it's on or off... Now it's just a case of you inserting an If statement. :)

Edited by badcoder123
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...