LOL: Hold one key pressed all the time Topic is solved

Ask gaming related questions (AHK v1.1 and older)
LOLShy
Posts: 2
Joined: 21 Jan 2021, 18:53

LOL: Hold one key pressed all the time

Post by LOLShy » 21 Jan 2021, 19:00

As you know, in league of legends we can show our attack range as a blue circle by press "c". Now the problem is that I dont want to press "c" all the time. I wonder if theres some simple way like

KeyDown "c", 1
Delay 2400000
KeyUp "c",1


So I dont need to find a rock to hold my c button and relieve my keyboard of the pressure.

Any help would be appreciated!

Best,
Shy
User avatar
Spawnova
Posts: 557
Joined: 08 Jul 2015, 00:12
Contact:

Re: LOL: Hold one key pressed all the time  Topic is solved

Post by Spawnova » 21 Jan 2021, 20:09

Code: Select all

F1::  ;key used to activate macro
toggle := !toggle  ; just turns it on and off
if (toggle)
	send {c down}
else
	send {c up}
return
If it doesn't work in game try and run the script as admin
LOLShy
Posts: 2
Joined: 21 Jan 2021, 18:53

Re: LOL: Hold one key pressed all the time

Post by LOLShy » 22 Jan 2021, 11:15

Code: Select all

$numpad1::
toggle := !toggle  ; just turns it on and off
if (toggle)
	send {c down}
else
	send {c up}
return
The reason I change F1 to numpad1 is that F1 is taken by another function. And now it works perfectly. I finally find a smart way to implement this. My keyboard and I owe you thanks.

Best,
Shy
ayano1234
Posts: 1
Joined: 17 Nov 2022, 09:03

Re: LOL: Hold one key pressed all the time

Post by ayano1234 » 17 Nov 2022, 09:05

I tried using this code and running AHK as administrator but it doesn't seem to work while I'm in game no matter what. Does it still work for you or have they made it so it's not possible to work in game anymore?
Post Reply

Return to “Gaming Help (v1)”