Hit 2 buttons script
Hit 2 buttons script
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).
- DuckingQuack
- Posts: 219
- Joined: 20 Jan 2023, 18:20
Re: Hit 2 buttons script
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.
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.
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)
}
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
The Duck
Re: Hit 2 buttons script
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.
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.
- DuckingQuack
- Posts: 219
- Joined: 20 Jan 2023, 18:20
- DuckingQuack
- Posts: 219
- Joined: 20 Jan 2023, 18:20
Re: Hit 2 buttons script
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
The Duck