How do I use CTRL to modify Mouse wheel functions? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
AtotehZ
Posts: 6
Joined: 28 Apr 2016, 11:09

How do I use CTRL to modify Mouse wheel functions?

04 Feb 2022, 22:18

Hello,

I'm trying to turn Control into a hotkey for modifying WheelUp and WheelDown on the mouse.
When Control is not held, the mouse wheel should function as normal.
When Control is held, 'WheelDown' should send 'Numpad8' and 'WheelDown' should send 'Numpad2'

I don't know where to start with this. I tried the search, but I didn't find any examples that could help me.

I'd appreciate any help.
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: How do I use CTRL to modify Mouse wheel functions?  Topic is solved

05 Feb 2022, 02:44

Give this a try:

Code: Select all

^WheelDown::Send, {Numpad8}
^WheelUp::Send, {Numpad2}
VISHALVODRO
Posts: 26
Joined: 02 Apr 2016, 05:53

Re: How do I use CTRL to modify Mouse wheel functions?

05 Feb 2022, 03:19

This is what I did for one of my scrip...

Code: Select all

;SOUND Control
!WheelDown::SoundSet, -5 ; Alt+Wheel Down to Decrease Volume
!WheelUp::SoundSet, +5   ; Alt+Wheel Up to Increase Volume
F1::SoundSet, +1, , mute  ; Toggle the master mute (set it to the opposite state)
[Mod edit: [code][/code] tags added.]
User avatar
AtotehZ
Posts: 6
Joined: 28 Apr 2016, 11:09

Re: How do I use CTRL to modify Mouse wheel functions?

05 Feb 2022, 07:54

Now I feel sorry about even asking. Of course it's that simple.

I hadn't slept for 40 hours due to illness and thought this was way more complicated than it was.

Honestly, both of your answers are good.
VISHALVODRO
Posts: 26
Joined: 02 Apr 2016, 05:53

Re: How do I use CTRL to modify Mouse wheel functions?

05 Feb 2022, 08:51

I am too beginner in this automation. But love to share if I knew something. Happy to help...
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: How do I use CTRL to modify Mouse wheel functions?

05 Feb 2022, 10:36

AtotehZ wrote:
04 Feb 2022, 22:18
I don't know where to start with this.
After you'll awake from a long good sleep, you can start with this article in the documentation :arrow:: Hotkeys.
This experience will lead you to a fairly big amount of interesting and useful discoveries.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
User avatar
AtotehZ
Posts: 6
Joined: 28 Apr 2016, 11:09

Re: How do I use CTRL to modify Mouse wheel functions?

05 Feb 2022, 11:28

Thanks. The problem wasn't that I didn't know it though. It was that I was too tired to put it into practice. I was way too tired and overcomplicated things.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: How do I use CTRL to modify Mouse wheel functions?

05 Feb 2022, 11:59

Sure, have a good sleep as soon as possible.
Nontheless maybe it would be useful for you to brush up on some concepts reading that article. For example this one:
Spoiler
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], whoops and 192 guests