这位大佬
@lengmianshi 用ahk实现了(双击/右键关闭标签、滚轮滑动标签[IE/Edge/Chrome/firefox]_firefox吧_百度贴吧),个人用了几天感觉不错(edge版本134.0.3124.72),以下代码在此基础上用通义千问Qwen精简而来,仅保留了edge右键关闭标签页功能,在此向原作者致敬!精简后的ahk代码如下:
#NoEnv
#SingleInstance force
EmptyMem()
#IfWinActive ahk_exe msedge.exe
~RButton up::
{
close_ed()
}
Return
#IfWinActive
close_ed(){
MouseGetPos, xpos, ypos
WinGet, Mom
; 判断是否在标签栏区域(根据实际需要调整坐标阈值)
If ((ypos > 45) && (Mom < 1)) || ((ypos > 37) && (Mom > 0)) || (ypos < 0)
{
Return
}
Send, {ESC}
MouseClick, Middle
EmptyMem()
}
EmptyMem(){
DllCall("SetProcessWorkingSetSize", "UInt", -1, "Int", -1, "Int", -1)
}