Hello! How to do that, for example, I click a key
"g" and it creates a loop that sends the given text, but if I click on a key other than g it stops
Without Pause and Without Suspend
If a given key was clicked, perform the action Topic is solved
Re: If a given key was clicked, perform the action Topic is solved
Code: Select all
$g::
SetTimer, Go, 100
Input, key, IL1, % "{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}"
. "{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}"
. "{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}"
. "{Del}{Ins}{BS}{CapsLock}{NumLock}{PrintScreen}{Pause}"
SetTimer, Go, Off
Return
Go:
SendInput {Text}given text
Return
Re: If a given key was clicked, perform the action
Hallo,
or:
or:
Code: Select all
#InstallKeybdHook
$q Up::
While, (A_PriorKey = "q") or (A_TimeIdleKeyboard > 200)
{
SendInput, {Text}given text
Sleep, 100
}
Return