StrokesPlus.net教程及脚本持续更新

鼠标穿屏

鼠标在屏幕上下左右边界穿过到另一侧,如果使用多个屏幕需要调整下代码

可以添加到 光标移动到屏幕角落执行任务 13# 计时器中

添加到全局动作-启动/退出-启动(开启)

sp.CreateTimer("CornerCheck",
                         0,
                         200,
                         `var mousePos = sp.GetCurrentMousePoint();
                        var mouseScreen = Screen.FromPoint(mousePos);
                        if(mousePos.X == mouseScreen.Bounds.Right - 1 && mousePos.Y > mouseScreen.Bounds.Top + 10 && mousePos.Y < mouseScreen.Bounds.Bottom - 10) {
                            //Right
                            sp.MouseMove(new Point(1, mousePos.Y));
                        } else if(mousePos.X == mouseScreen.Bounds.Left && mousePos.Y > mouseScreen.Bounds.Top + 10 && mousePos.Y < mouseScreen.Bounds.Bottom - 10) {
                            //Left
                            sp.MouseMove(new Point(mouseScreen.Bounds.Right  - 14, mousePos.Y));
                        } else if(mousePos.Y == mouseScreen.Bounds.Top && mousePos.X > mouseScreen.Bounds.Left + 10 && mousePos.X < mouseScreen.Bounds.Right - 10) {
                            //Top
                            sp.MouseMove(new Point(mousePos.X, mouseScreen.Bounds.Bottom  - 18));
                        } else if(mousePos.Y == mouseScreen.Bounds.Bottom - 1 && mousePos.X > mouseScreen.Bounds.Left + 10 && mousePos.X <  mouseScreen.Bounds.Right - 10) {
                            //Bottom
                            sp.MouseMove(new Point(mousePos.X, 1));
                        }`
);