I need a script that pushes down end key until I push down any other keys

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jel1
Posts: 1
Joined: 02 Dec 2022, 01:55

I need a script that pushes down end key until I push down any other keys

Post by jel1 » 02 Dec 2022, 02:12

I need a script that pushes down end key until I push down any other keys.

I tried this, not working. It's pushing down the end key, but then immadiately releasing up, without waiting for me to push down a key:

Code: Select all

Send {end down}
Input, SingleKey, L1, {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}
Send {end up}
thank you for the help.

Rohwedder
Posts: 7655
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: I need a script that pushes down end key until I push down any other keys

Post by Rohwedder » 02 Dec 2022, 02:37

Hallo,
here it works:

Code: Select all

SetTimer,State,% (200,Keys:="End") ;Keys separated with space or tab
Send {end down}
Input, SingleKey, L1, {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}
Send {end up}
Return
State: ;KeyStateTimer shows the logical State of Keys
For all,Key in StrSplit(Keys,[A_Space,A_Tab])
	Text.=Trim(Key)>""?"`n" Key "`t" (GetKeyState(Key)?"down":"up"):
MouseGetPos, MX, MY ;separated from another ToolTip
ToolTip,% SubStr(Text,2),MX+16,MY+32,4,Text:=""
Return

Post Reply

Return to “Ask for Help (v1)”