force Hotstring to type text that triggered it (case sensitive) Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
pcg
Posts: 4
Joined: 18 Jan 2023, 00:11

force Hotstring to type text that triggered it (case sensitive)

Post by pcg » 08 Feb 2023, 00:42

Hello everybody!

I'm working on script that shows in transparent clicktrhough mode on my screen the key from keyboard\mouse that i'm pressing, for my videos/livestreams.
I am already done with that, but now i have a problem, when i'm typing my passwords, it shows my keys on livestream f.e.

I tried to make a hotstring that stops my subroutine for main logic when i start typing my password, and succeded.
But i bumped into another problem.
When i'm starting to type my password it triggers Hotstring and deletes my input, and i need for text to not be deleted but just to stop my subroutines, so i can continue typing my password.

f.e.:
if i type "MyPaSsW" it will trigger hotstring and stop showing my keys on screen, but it will delete all my input and swap it with "mypassw" instead of "MyPaSsW" but i need the original version of my input.
Here is my code:

Code: Select all

:?*:mypassw::										; type "mypassw" case or no case sensitive to trigger Hotstring
mainLogicStop()
return

mainLogicStop()
{
	Global
	StringTrimLeft, printMyBlockedText, % a:=A_ThisHotkey, 4		; i tried to get around with those 2 lines but it is not case-sensitive
	SendInput, % printMyBlockedText						; i tried to get around with those 2 lines but it is not case-sensitive
	Suspend, Toggle
	SetTimer, mainLogic, off
	Sleep 5000										; here i actually have Tooltip Loop with backward countdown, but for your convinience i swapped it with Sleep
	Suspend, Toggle
	SetTimer, mainLogic, 1
}

User avatar
boiler
Posts: 16965
Joined: 21 Dec 2014, 02:44

Re: force Hotstring to type text that triggered it (case sensitive)  Topic is solved

Post by boiler » 08 Feb 2023, 02:00

How about the B0 hotstring option?

User avatar
pcg
Posts: 4
Joined: 18 Jan 2023, 00:11

Re: force Hotstring to type text that triggered it (case sensitive)

Post by pcg » 08 Feb 2023, 02:14

boiler wrote:
08 Feb 2023, 02:00
How about the B0 hotstring option?
Hmmm, I can swear that i tried it, because i read whole Hostring documentation page and tried almost every option that i thought is suitable to my case. Now that i read it again, it actually seems as legit solution. I will definetely try it when i reach my pc, thank you !

Post Reply

Return to “Ask for Help (v1)”