大佬这么好用的动作,能否提交给官方,改进一下官方的轮盘菜单
问题原因,动作中有一个子程序修改了鼠标的坐标。
试试这个的办法。更改子程序代码。路径:编辑➡️子程序➡️显示位置,将下面的内容替换原内容。
---这是一个分割线---
$={ System.Drawing.Point mousePt = new System.Drawing.Point(@{mouseX}, @{mouseY}); System.Windows.Forms.Screen currentScr = System.Windows.Forms.Screen.FromPoint(mousePt); System.Drawing.Rectangle workArea = currentScr.WorkingArea;
// 获取DPI缩放比例 float dpiScale = System.Drawing.Graphics.FromHwnd(System.IntPtr.Zero).DpiX / 96.0f;
// 计算调整后的窗口大小和位置 int adjustedSize = Math.Min((int)(@{窗口大小} dpiScale), Math.Min(workArea.Width, workArea.Height)); int offsetY = (int)((@{打开修改界面} ? 40 : 0) dpiScale);
// 计算并约束窗口位置:鼠标居中,防止跑出当前显示器 int windowX = Math.Max(workArea.Left, Math.Min((int)(@{mouseX} - adjustedSize / 2), workArea.Right - adjustedSize)); int windowY = Math.Max(workArea.Top, Math.Min((int)(@{mouseY} - adjustedSize / 2 - offsetY), workArea.Bottom - adjustedSize));
return string.Format("{0},{1}", windowX, windowY); }