Hit 2 buttons script

Ask gaming related questions
mdrake1
Posts: 29
Joined: 18 Oct 2020, 07:15

Hit 2 buttons script

Post by mdrake1 » 02 Mar 2023, 13:14

Hi i'm looking for a script that when i hit scroll wheel down it will hit 1 and then insert key. Also i want it do disable 10 scroll clicks at the end(it's hard to scroll only one click).

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Hit 2 buttons script

Post by DuckingQuack » 02 Mar 2023, 19:06

Hey!
I get the 1 and then insert part, but I was a little lost on the disable 10 scrolls, but I think you meant that the next 10 scrolls won't activate the script because you don't want it happening a bunch of times in a row.
If that is the case, I slapped a little something together that should get the job done. If this does not work as expected, please let me know. Instead of disabling the scroll down, I made the hotkey only able to fire once per second, so don't continue scrolling for longer than 1 second and it will only happen once. If this timer is too short or too long, edit the sleep value. It is in milliseconds, so 1000 is 1 second.

Code: Select all

#Requires AutoHotkey v2.0
#SingleInstance Force
Esc::ExitApp

WheelDown:: {
    Send("1{Insert}")
    Sleep(1000)
}
P.S.
If you want to still be able to use the scroll down, then we can add a toggle to the hotkey or let both work at same time.
Best of Luck,
The Duck

mdrake1
Posts: 29
Joined: 18 Oct 2020, 07:15

Re: Hit 2 buttons script

Post by mdrake1 » 02 Mar 2023, 20:01

Thanks for helping.
So ya it works but only one time. I would like it work again after the sleep. With a toggle like u said i guess.

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Hit 2 buttons script

Post by DuckingQuack » 02 Mar 2023, 20:07

What version of ahk are you using?
Best of Luck,
The Duck

mdrake1
Posts: 29
Joined: 18 Oct 2020, 07:15

Re: Hit 2 buttons script

Post by mdrake1 » 02 Mar 2023, 21:25

i have newest version

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Hit 2 buttons script

Post by DuckingQuack » 03 Mar 2023, 06:47

I’ve done thorough testing of this script and I am not having the same issue you are, so I apologize if this insults your intelligence, but I feel compelled to ask if you’re hitting Esc between usages, because that closes the script. It will not run a second time if you hit Esc.
Best of Luck,
The Duck

Post Reply

Return to “Gaming”