有没有办法禁用 Chrome 标签上的悬停工具提示?
每当鼠标指针恰好位于选项卡上时,它们就会变得非常烦人且令人分心。
答案1
答案2
答案3
我无法得到移动光标的程序的想法为了让你忘记我的想法,所以我把它拼凑起来了。
下面是一个 AutoHotkey 脚本(如果需要,可以编译为独立的可执行文件),它可以检测鼠标光标是否在 Chrome 窗口顶部附近保持空闲一段时间,如果是,则将其移动到屏幕的右下角。
它按预期工作并阻止工具提示弹出,但由于时间错开(子程序触发和工具提示倒计时),有时工具提示会在光标移动前一瞬间弹出。这可以通过减少计时器(变量tip
)来减少。
我还考虑通过手动处理计时器来增强脚本,而不是使用 AutoHotkey 的计时器。这样,它可以从上次移动鼠标或按下按钮的时间开始倒计时,而不仅仅是每次X秒,无论。
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MoveIdleMouse.ahk
;
; Prevents tooltips from being annoying in Chrome by detecting
; when the mouse is idle while near the top of a Chrome window
; and then moving it to the bottom-right corner of the screen.
;
; https://superuser.com/questions/393738/
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#SingleInstance force
#Persistent
; Read the tooltip delay from the registry (this is the amount of time the
; cursor has to hover over something in order to trigger the tooltip)
RegRead, tip, HKCU, Control Panel\Mouse, MouseHoverTime
; Divide it by two to accommodate staggared timing. Adjust as desired.
;tip:=tip/2
; Set specified subroutine to run every so often (before tooltip triggered)
SetTimer, CheckCursor, %tip%
; Get the current mouse cursor position to compare to during first interval
MouseGetPos, x1, y1
return
; This subroutine checks the current cursor position and moves if idle
CheckCursor:
; First check if the cursor is over a Chrome window; ignore if not
IfWinNotActive, ahk_class Chrome_WidgetWin_0
return
; Next, check if any buttons are pressed and ignore if so
if (GetKeyState("LButton") or GetKeyState("RButton") or GetKeyState("MButton")
or GetKeyState("XButton1") or GetKeyState("XButton2"))
return
; Get the current mouse position and check if it is both unchanged, and
; near the top of Chrome (position is relative to window by default)
MouseGetPos, x2, y2
If (((x1 = x2) and (y1 = y2)) and ((y2 >= 0) and (y2 <= 27)))
{
; Move the cursor to the bottom-right corner of the screen immediately
; You can adjust destination position as desired
MouseMove, A_ScreenWidth+3, A_ScreenHeight+3, 0
}
else {
; Update current cursor position to compare to during the next interval
x1 := x2
y1 := y2
}
return