[Help] Keyboard Input Broadcasting w/ Case Sensitivity Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
David7c8
Posts: 11
Joined: 05 Dec 2021, 16:06

[Help] Keyboard Input Broadcasting w/ Case Sensitivity

Post by David7c8 » 05 Dec 2021, 16:29

First off, I want to apologize. I've been searching for hours looking for this.

I'm trying to input my keyboard strokes as I type to multiple windows. My goal is to enter my same password on all. My password has lower/uppercase numbers/symbols.

So far I've found this somewhat working code:

Code: Select all

!+p::
SetTitleMatchMode, 2
WinGet, Hwnd_List, List , wow
SetKeyDelay,  ,10 ; I added this line myself hoping it would solve the capitalization issue
Loop, Parse, % "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()/" ; the original code here only had the lower case alphabet
	Hotkey, %A_LoopField%, LoopSend
return

LoopSend:
	Loop, %Hwnd_List%
	{
		Hwnd := Hwnd_List%A_Index%
		ControlSend,, %A_ThisHotkey%, ahk_id %Hwnd%
	}
return
The problem is that;
1. When I hold Shift to capitalize it only affects the active window.
2. At random it will not maintain case sensitivity, Shift held or not. (ex. abCDEfGhIJ..)
3. Symbols !, ^, and / don't seem to work. I have tried putting them in brackets. {}

If you can, please help me. I would appreciate it so much.

User avatar
mikeyww
Posts: 26869
Joined: 09 Sep 2014, 18:38

Re: [Help] Keyboard Input Broadcasting w/ Case Sensitivity  Topic is solved

Post by mikeyww » 05 Dec 2021, 16:50

This demonstration may help.

Code: Select all

Loop, Parse, % "abc!@#$%^&*()/"
 Hotkey, *%A_LoopField%, LoopSend, On
Return

LoopSend:
WinGet, Hwnd_List, List, ahk_exe notepad.exe
Loop, %Hwnd_List%
 ControlSend,, % "{Blind}{Raw}" StrReplace(A_ThisHotkey, "*"), % "ahk_id " Hwnd_List%A_Index%
Return

User avatar
David7c8
Posts: 11
Joined: 05 Dec 2021, 16:06

Re: [Help] Keyboard Input Broadcasting w/ Case Sensitivity

Post by David7c8 » 05 Dec 2021, 17:11

Mikey, this is incredible! Thank you! I made the changes necessary:

Code: Select all

!+p::
Loop, Parse, % "abcdefghijklmnopqrstuvwxyz1234567890/"
 Hotkey, *%A_LoopField%, LoopSend, On
Return

LoopSend:
SetTitleMatchMode, 2
WinGet, Hwnd_List, List , wow
Loop, %Hwnd_List%
 ControlSend,, % "{Blind}{Raw}" StrReplace(A_ThisHotkey, "*"), % "ahk_id " Hwnd_List%A_Index%
Return
Everything works flawlessly except the symbol ^ always prints twice which to be honest I couldn't care less. I'll look into that later if I have to.

Thank you so much! :dance: :superhappy: :dance:

Post Reply

Return to “Ask for Help (v1)”