Cycle through specific keys on held status Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Dijanigo
Posts: 14
Joined: 06 Aug 2017, 13:09

Cycle through specific keys on held status

Post by Dijanigo » 11 Aug 2022, 07:07

Hello guys, i'm looking for some script that cycles through keys as long as i hold a certain button, let's say C.

My background, for a better understanding: I play a rpg on a class that has very low skill cooldowns and i want to automate this by using an AHK macro.

Basically, the script should cycle through the keys A, Q, G and H over and over again, but only as long as i hold C. Maybe with some very minor delay in between keypresses, as i don't want some inputs to get eaten by the latency to the server.

I'd mega appreciate if someone could help me with that as i'm a complete idiot when it comes to understanding code in any form.

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

Re: Cycle through specific keys on held status  Topic is solved

Post by mikeyww » 11 Aug 2022, 09:05

Code: Select all

c::
SetKeyDelay, 25, 25
While GetKeyState("c", "P")
 Send aqgh
Return

Dijanigo
Posts: 14
Joined: 06 Aug 2017, 13:09

Re: Cycle through specific keys on held status

Post by Dijanigo » 11 Aug 2022, 09:17

This works perfectly, thank you very very much mikey. Much appreciated, have a great day :)

Post Reply

Return to “Ask for Help (v1)”