press a key when key is hel and press it when its released

Ask gaming related questions
Redotix99
Posts: 4
Joined: 11 Jul 2018, 11:50

press a key when key is hel and press it when its released

11 Jul 2018, 13:46

I want my right mouse button to press "O" when I hold it down and press it again when I release it.
reason is I want to change a DOF settign in my reshade mod when I am aiming down sights. and the game we are talking about is fallout 4 so I cant use toggle ADS
Redotix99
Posts: 4
Joined: 11 Jul 2018, 11:50

Re: press a key when key is hel and press it when its released

11 Jul 2018, 13:52

well I got it working with this command

RButton::send o
RButton Up::send o
Redotix99
Posts: 4
Joined: 11 Jul 2018, 11:50

Re: press a key when key is hel and press it when its released

11 Jul 2018, 14:17

now I would like to toggle this whole script by pressing tab. because otherwise I cant use Right mouse buttons normal functions. I tried

Tab::pause,toggle

but all it does is that it changes the script icon to red but the script is still going.
heres my whole code:

Tab::pause,toggle

RButton::send p
RButton Up::send p
Redotix99
Posts: 4
Joined: 11 Jul 2018, 11:50

Re: press a key when key is hel and press it when its released

11 Jul 2018, 14:23

alright fixed it with Tab::suspend
User avatar
Maped
Posts: 15
Joined: 08 Jul 2018, 15:52

Re: press a key when key is hel and press it when its released

11 Jul 2018, 16:47

Share the code please.
jamarchesan
Posts: 4
Joined: 14 Jul 2018, 07:57

Re: press a key when key is hel and press it when its released

14 Jul 2018, 08:07

Hi,
I need help to fix a macro.
I’m playing a game that I need to cast a skill in bottom “W” (some times) before fight. So, I created a macro that cast/ press W – infinitely.
But, I need to add a command that if I press any mouse bottom, this macro will pause automatically and back to work if any mouse bottom are pressed.
Original macro:
o:: Loop,
{
Send W
Sleep 400
}
Loop
{
p::exitapp

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 16 guests