1 key, multiple functions, base on number of times pressed.

Ask gaming related questions (AHK v1.1 and older)
augentism
Posts: 2
Joined: 07 Feb 2018, 14:32

1 key, multiple functions, base on number of times pressed.

07 Feb 2018, 14:39

i'm not sure if this is even possible, as my only experience with binds similar to these are from source engine games. What i want to do is lets say i have a key o. the first time i press o its sends a, then the second time i press it it sends b, lets say i have this go all the way through e. so that if i press o 5 times it sends abcde then when i press it the 6th time it starts back over at a. is this possible and how would i go about doing this?
Spark
Posts: 80
Joined: 04 Jan 2017, 02:22

Re: 1 key, multiple functions, base on number of times pressed.

07 Feb 2018, 21:53

hi,
i'm not sure what do you want,

try this

Code: Select all

list=a,b,c,d,e ; the list of keys and combos. comma separated.
stringsplit, list, list,`,
Counter = 0

o::                                ; press o to cycle through
  Counter := (Counter=list0) ? (1) : (Counter+1)
  send % list%counter%
return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 85 guests