Page 1 of 1
CapsLock and ControlSend
Posted: 25 Dec 2021, 21:15
by ibieel
hello guys, I realized that AHK turns off the capslock when executing "ControlSend".
so, when I'm writing some sentence in CAPSLOCK (while running ControlSend), the sentence goes like this: "ThiS IS thE SEntENce".
would have to add some command so that if the capslock is turned on, not turn it off while running "ControlSend". ???
![Hit my head against the wall. :headwall:](./images/smilies/headwall.gif)
Re: CapsLock and ControlSend Topic is solved
Posted: 26 Dec 2021, 17:09
by TLM
ibieel wrote: ↑25 Dec 2021, 21:15
would have to add some command so that if the capslock is turned on, not turn it off while running "ControlSend". ???
Try adding
SetStoreCapsLockMode, Off before the
ControlSend command.
The only downside is your what ever you're sending to the control will now be affected by Capslock.
In this case, i'd use
ControlSetText instead of ControlSend.
Re: CapsLock and ControlSend
Posted: 26 Dec 2021, 17:44
by ibieel
TLM wrote: ↑26 Dec 2021, 17:09
Try adding
SetStoreCapsLockMode, Off before the
ControlSend command.
The only downside is your what ever you're sending to the control will now be affected by Capslock.
In this case, i'd use
ControlSetText instead of ControlSend.
my script has several controlsend, do i need to put the command "SetStoreCapsLockMode, Off" before all the "ControlSend" ?
Re: CapsLock and ControlSend
Posted: 26 Dec 2021, 18:19
by amateur+
Read the documentation of
SetStoreCapsLockMode:
Every newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for this command. That default may be changed by using this command in the auto-execute section (top part of the script).