Hi!
I'm looking for a script to control volume by mouse wheel but only when it's pressed down.
Control volume with mouse with pressed wheel
Re: Control volume with mouse with pressed wheel
Hi and welcome,
Sounds a bit unorthodox (to use I mean).
Anyway, try this:
Don't break your finger
Cheers!
Sounds a bit unorthodox (to use I mean).
Anyway, try this:
Code: Select all
~mbutton::
while GetKeyState("mbutton", "P") ; While mbutton is pressed:
{
wheelMode = 1 ; Enable this wheelmode
}
wheelMode = 0 ; Disable it
return
#if wheelMode = 1 ; Only if mbutton is pressed:
WheelUp::
Send {Volume_Up}
return
WheelDown::
Send {Volume_Down}
return
#if ; Close #if-Block
Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: Control volume with mouse with pressed wheel
Thanks! Works like a charm! I'm really surprised how quick was your response and how helpful you are. I know that my "request" is little weird so quick explanation. I was looking for USB dongle to control volume. Simple small (like mouse BT dongle) potentiometer and couldn't find anything like that. I'm sleeping with notebook next to my bed on the coffee table 'cause I like to play some YT documentaries to sleep. And it's really annoying to open the lid, looking for volume control etc. when you're trying to fall asleep. This way I can do it without opening eyes. Yeah, I know, first world problems.
Who is online
Users browsing this forum: Frogrammer, gongnl and 266 guests