Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

change sound volume by mouse wheel


  • Please log in to reply
3 replies to this topic
xah
  • Members
  • 38 posts
  • Last active: Jun 14 2010 02:39 PM
  • Joined: 25 Aug 2009
in windows vista, you can click the speaker icon in the system notification area, then mouse wheel can be used to control volume.

is it possible to use ahk to set a key, say F6, so that after pressing F6, one can use mouse wheel to control volume?

Thanks.

Xah

Murx
  • Guests
  • Last active:
  • Joined: --
Yes.

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
F6::State:=!State ;the ! means Logical Not in expressions

$WheelUp::
If State
Send {Volume_Up}
Else
Send {WheelUp}
Return

$WheelDown::
If State
Send {Volume_Down}
Else
Send {WheelDown}
Return
F6 is a toggle press once for volume press again for scroll

xah
  • Members
  • 38 posts
  • Last active: Jun 14 2010 02:39 PM
  • Joined: 25 Aug 2009
Thanks.
seems using AHK's default way to control volume has the same flaw as the volume buttons on the keyboard... it is not instaneous.

The Windows Vista way with mouse wheel seems instaneous as one'd control the stereo volume wheel.

Here's what i found to activate the volume control using mose:

; F1 to activate volume chane, so mouse wheel will work.
F1::
Send #b{Left}{Left}{Enter}
Return