0

Question:

I want to use my scroll wheel to open an inactive window when I scroll up on an icon in the taskbar in Windows 10. The same behavior as in Ubuntu when you scroll up on an icon in the taskbar.

Is there a setting to do this, or program?

Why:

I've been working on a Linux system and am now used to scroll up on a icon in order to open an inactive window. This is has nice feeling for the work flow, I would like to transfer this to Windows 10, but can't find anything that does this. Yes, I know I can just click on it, but sometimes it's nice to just scroll as my finger is already there a lot of the time when working.

Note: I'm not looking for the inactive hover over scroll functionality, that works just fine.

1

You can use AutoHotkey to do this. Basically you tell it that if your cursor is over the taskbar or one of the preview thumbnails that opens from it, then scrolling up with your mouse wheel sends a left click, otherwise it scrolls up.

This requires using the Windows API. I've tested this script and it seems to work like you want, though I believe it will send a click anywhere on the taskbar, and not just over window icons. I'm afraid that's the best I could manage.

GetWinUnderMouse(what="Title")
{
    ; Allocate the memory (8 bytes) for the POINT structure
    VarSetCapacity(POINT, 8, 0)

    ; Call the GetCursorPos function with the address 
    ; of the POINT structure we just created
    DllCall("GetCursorPos", uint, &POINT)

    ; Use NumGet to get the information out of the structure
    ; the x-value is stored in the first 4 bytes, and 
    ; the y-value in the last 4
    X := NumGet(POINT, 0)
    Y := NumGet(POINT, 4)

    return GetWinAtCoords(X, Y, what)
}

GetWinAtCoords(x,y,what="Title")      ; by SKAN and Learning one
{
    ; Returns Title/ID/Class/PID of window at given coordinates
    WinID := DllCall( "GetAncestor", UInt      ; by SKAN
           ,DllCall( "WindowFromPoint", Int,X, Int,Y )
           , UInt, GA_ROOT := 2)
    if what = Title
    {
        WinGetTitle, WinTitle, ahk_id %WinID%
        Return WinTitle
    }
    else if what = ID
    Return WinID
    else if what = Class
    {
        WinGetClass, WinClass, ahk_id %WinID%
        Return WinClass
    }
    else if what = PID
    {
        WinGet, WinPID, PID, ahk_id %WinID%
        Return WinPID
    }
}

WheelUp::
    PointedClass := GetWinUnderMouse("Class")
    if (PointedClass = "TaskListThumbnailWnd" or PointedClass = "Shell_TrayWnd")
    {
        Send, {LButton}
    }
    else
    {
        Send, {WheelUp}
    }
Return

If you add a tilde (~) before WheelUp:: then the wheel up functionality will remain even when a left click is sent (you can also do away with the else clause in there if you do so).

To use, simply install the program, put the script in a file and run it.

  • Ohhhh, thank you so much! You could've just suggested the Autohotkey and make me do the work, I almost feel bad. You might want to try it yourself aswell, once you're used to it, no turning around. – Nytrix Sep 28 '17 at 18:16
  • I have some experience with AutoHotkey and thought it'd be simpler, but it actually did take a bit of work to get it working. XD No matter; I'm glad it works, and it was fun to make. ^_^ – Tomer Godinger Sep 28 '17 at 18:18
0

You could use some programs such as AlwaysMouseWheel, X-Button Mouse Control! On Windows 7, is there any way to make the scrollwheel's focus follow the mouse?

  • Somehow, I can't seem to find the option I want/need. I can bind left click to scrolling up, yet that will just totally disable scrolling up. I want it to essentially do both. Ideally I would even only want it to left click when on an inactive window icon. – Nytrix Sep 28 '17 at 11:16
  • have you enable Activate windows when scrolling option in x-button mouse setting? then in layer wheel up option, you could choose left click – daidai Sep 29 '17 at 1:10
  • Yes, but then it doesnt scroll anymore, it just ledt clikcs – Nytrix Sep 29 '17 at 3:19
  • It's strange. After set it, I could scroll up the wheel to open the taskbar icon such as Edge and so on. – daidai Sep 29 '17 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.