Chrome randomly stops taking WheelDown/Up

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mkernalcon
Posts: 1
Joined: 14 Dec 2018, 16:55

Chrome randomly stops taking WheelDown/Up

14 Dec 2018, 17:24

Hi,

I use AHK to make my Logitech Trackman Marble scroll in Windows with button3 down (like it does so nicely in OS X and Linux). I just upgraded computers here at work, from an older Win7 machine to a brand new Win10 machine. I had some problems on the old machine with my AHK setup, but I had several other strange issues as well (I think the PSU or RAM was beginning to fail).

There's one new issue that's really bothering me: certain websites will just stop scrolling in Chrome (does not seem to affect other browsers). Most pages don't have a problem, but certain pages will have a problem every single time. I'll be in the middle of scrolling, and suddenly the page stops. Another attempt to scroll will properly block mouse events (see my script below), but still will not scroll. Refreshing the page makes it work properly for a short time again, before it fails again. If a tab is broken, I can scroll other tabs, but that tab will remain broken.

I'm not too familiar with AHK, so I'm not too sure where to start debugging this. Any ideas?

Here's just a random example of an article that does this for me: https://docs.oracle.com/cd/E19065-01/se ... 3/ch3.html

Thanks in advance.

Code: Select all

#include <MouseDelta>

md := new MouseDelta("MouseEvent")
return

XButton1::
	MouseGetPos,,,,winhwnd,2
	WinActivate,ahk_id %winhwnd%
	BlockInput, MouseMove
	md.SetState(1)
	return

XButton1 up::
	md.SetState(0)
	BlockInput, MouseMoveOff
	return

sendWhR() {
	if (WinActive("ahk_exe FoxitPhantomPDF.exe")) {
		ControlGetFocus, mycontrol, A
		SendMessage, 0x114, 1, 0, %mycontrol%, A
	}
	else {
		Send {WheelRight}
	}
}

sendWhL() {
	if (WinActive("ahk_exe FoxitPhantomPDF.exe")) {
		ControlGetFocus, mycontrol, A
		SendMessage, 0x114, 0, 0, %mycontrol%, A
	}
	else {
		Send {WheelLeft}
	}
}

MouseEvent(MouseID, x := 0, y := 0){
	if (x != 0){
		if (x > 0){
			sendWhR()
		} else {
			sendWhL()
		}
	}
	if (y != 0){
		if (y > 0){
			Send {WheelDown}
		} else {
			Send {WheelUp}
		}
	}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, mebelantikjaya, rc76 and 318 guests