koin Posted June 7, 2016 Share Posted June 7, 2016 Hello, im trying to make a script which "remapps" keys when capslock is pressed. #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") While WinExists("Unbenannt - Editor") If _IsPressed("14", $hDLL) Then ConsoleWrite("Key PRESSED" & @CRLF) ;Wait until key is released While _IsPressed("14", $hDLL) If _IsPressed("51") Then Send("j") EndIf WEnd TurnOffCapslock() EndIf WEnd Func TurnOffCapslock() Opt("SendCapslockMode", 0) Send("{CAPSLOCK OFF}") EndFunc DllClose($hDLL) Sorry for the messy Code, Im new to AutoIt My questions are: 1) when I open notepad and press Capslock + Q to send an j, it sends something like "qjjjjjj". - how can I remove the q and is there a easy way included to get only one "j"? - since Im holding Capslock, it sends a upper case "J", is there a way to lower-case it? 2) I'd like to remapp keys while holding capslock what would be the best way to realise this for more than one key? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now