I want to use LButton/RButton as modifiers + Mouse Wheel/Up/Down and keep all the functionalities, Drag, Double-Click etc...
-Copy/Paste everywhere with LButton & RButton/RButton & LButton.
-Control the volume everywhere with RButton + Wheel/Up/Down.
-To zoom in Chrome with LButton + Wheel/Up/Down.
The problem with my script is that I lost the ability to drag with RButton. In Chrome, I want to avoid a click after zooming/Unzooming and Copy/Paste everywhere doesn't work at all.
I tried a few things, read some documentation but wasn't able to make it work. How to do this and still keep all the functionalities of RButton, LButton and Mouse Wheel?
Any help would be greatly appreciated!
Code: Select all
#NoEnv
#SingleInstance, Force
SendMode Input
SetWorkingDir %A_ScriptDir%
;=============================================================================================
; Volume Change with Mouse (Gui)
;=============================================================================================
Gui, GuiVolumeChange: New
Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption +LastFound
Gui, Font, s10 w700
Gui, Add, Text, w300 Center, Volume
Gui, Add, Progress, wp h20 vvol cBlue
Gui, Font, w400
Gui, Add, Text, wp Center vvolText
;=============================================================================================
; Volume Change with Mouse
;=============================================================================================
RButton:: Send, {RButton}
RButton & WheelUp::
RButton & WheelDown::
SoundSet, % Instr(A_ThisHotkey, "WheelDown") ? -2 : "+2"
SoundGet, Volume
GuiControl, GuiVolumeChange:, vol, % Volume
GuiControl,GuiVolumeChange:, volText, % Round(Volume)
Gui, GuiVolumeChange: Show, % "x" . (A_ScreenWidth/1.275) . "y" . (A_ScreenHeight/1.18) . " NoActivate"
SetTimer, GuiEscape, -1500
Return
GuiEscape:
Gui, GuiVolumeChange: Hide
Return
;=============================================================================================
; Global Hotkeys
;=============================================================================================
; ~LButton & RButton:: ; Copy Selected
; Send, ^c
; Clipwait, 1
; if (ErrorLevel) {
; MsgBox, The attempt to copy text onto the clipboard failed.
; return
; }
; return
; ~RButton & LButton:: ; Paste Selected
; Send, ^v
; Clipwait, 1
; if (ErrorLevel) {
; MsgBox, The attempt to copy text onto the clipboard failed.
; return
; }
; return
;=============================================================================================
; Google Chrome
;=============================================================================================
#IfWinActive ahk_exe Chrome.exe
~LButton & WheelUp:: Send, ^{+} ; Zoom In
~LButton & WheelDown:: Send, ^{-} ; Zoom Out