B
B
BandiCrash2020-07-08 18:41:28
autohotkey
BandiCrash, 2020-07-08 18:41:28

How to simulate a wheel on an additional mouse button?

Hey! I'm not very familiar with ahk. In general, the mouse wheel is broken. Buying a new mouse is not possible at the moment. I decided to write a simple script that simulates the scrolling of the wheel on the add. (side) mouse buttons.
It turned out to write the script, but it’s not convenient to click the button once. Is there a way to do it all by pressing a button?

vk0x05::
    Send {WheelUp Down}
    sleep, 0
    Send {WheelUp Up}

Return

vk0x06::
    Send {WheelDown Down}
    sleep, 0
    Send {WheelDown Up}
Return

Why in the code Sleep and clamping Down / Up I don’t remember

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vehs, 2020-11-10
@Vehs

XButton1::
{
  Loop
  {
    send {WheelUp}
    if !GetKeyState("XButton1", "P")
    {
    break
    }				
    Sleep 50 ; чем меньше число, тем выше скорость прокрутки
  }
}

XButton2::
{
  Loop
  {
    send {WheelDown}
    if !GetKeyState("XButton2", "P")
    {
    break
    }				
    Sleep 50				
  }
}

return

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question