Hey evl, hope you are checking this thread
I have played with modifying the script a bit, and am running into a weird problem:
in ListView_Destroy, after the Gui, 1: Destroy line, I add
Loop {
RButtonDown := GetKeyState("RButton","P")
If (!RButtonDown)
Break
Sleep 10
}
*Problem*: this loop never executes. The window switches, and instantly registers a right-click in the new window. However, when I added this loop to the barebones script posted earlier, it worked just as expected.
Why the hell am I doing this:
I'm trying to make the script play well with Logitech MX Rev. mouse rocker switch. I'm trying to invoke alt-tab app list, then scroll via the wheel, then press a mouse button (currently RButton) to select it.
I got this to work by adding
If A_GuiEvent = RightClick to the ListView_Event subroutine
This works, but for aesthetic reasons (to avoid highlighting the wrong app on RightClick) I want to trigger the window switch on mouse down, as opposed to mouse up (with RightClick). So, I tried using in ListView_Event
If GetKeyState("RButton")
If A_GuiEvent = RightClick
{
RightClickFlag = 1;
Gosub, ListView_Destroy
}
and to make sure the button got released before commencing the window switch to add the loop that waits for the RButton to be lifted up
in ListView_Destroy, after the Gui, 1: Destroy line, I add
Loop {
RButtonDown := GetKeyState("RButton","P")
If (!RButtonDown)
Break
Sleep 10
}
But this loop never executes. The window switches, and instantly registers a right-click in the new window. When I added this loop to the barebones script posted earlier, it worked just as expected.