RButton and loop help?

Ask gaming related questions
JSteelz1
Posts: 3
Joined: 20 Apr 2023, 10:33

RButton and loop help?

31 Dec 2023, 07:03

Hi

I'm struggling to create a macro that allows me to do the following:

Pressing Mouse 2, presses mouse 2 but also sends 'e'.

Whilst also having a loop that sends ctrl+t every 10.72 seconds.

Any help please?
User avatar
mikeyww
Posts: 27261
Joined: 09 Sep 2014, 18:38

Re: RButton and loop help?

01 Jan 2024, 09:04

Code: Select all

#Requires AutoHotkey v2.0
ct := () => Send('^t')

~RButton::e

F3:: {
 Static on := False
 If on := !on
      SetTimer(ct, 10720), ct()
 Else SetTimer(ct, 0)
 SoundBeep 1000 + 500 * on
}
Rohwedder
Posts: 7735
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: RButton and loop help?

02 Jan 2024, 03:47

Hallo,
or:

Code: Select all

#Requires AutoHotkey v2.0
~RButton::e
F3:: {
	Static I := False, T := Send.Bind("^t")
	SetTimer(T, 10720 * I := !I), I && T()
	SoundBeep 1000 + 500 * I
}
JSteelz1
Posts: 3
Joined: 20 Apr 2023, 10:33

Re: RButton and loop help?

02 Jan 2024, 13:01

Thank you so much, you legend!

Return to “Gaming”

Who is online

Users browsing this forum: jooolius and 14 guests