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

光标移动到屏幕角落执行任务

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

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) {
                                    //右上角动作
                                    //sp.MessageBox("In upper right corner!", "Hi");
                                    if(!sp.GetStoredBool("CornerCheckActive")) {
                                        sp.SendModifiedVKeys([vk.LMENU], [vk.F4]);//关闭窗口
                                        sp.StoreBool("CornerCheckActive", true);
                                    } 
                               } else if(mousePos.X == mouseScreen.Bounds.Right - 1 && mousePos.Y == mouseScreen.Bounds.Bottom - 1) {
                                    //右下角动作
                                    //sp.MessageBox("In lower right corner!", "Hi");
                                    if(!sp.GetStoredBool("CornerCheckActive")) {
                                        sp.SendModifiedVKeys([vk.LWIN], [vk.VK_D]);//显示桌面
                                        sp.StoreBool("CornerCheckActive", true);
                                    } 
                               } else if(mousePos.X == mouseScreen.Bounds.Left && mousePos.Y == mouseScreen.Bounds.Top) {
                                    //左上角动作
                                    //sp.MessageBox("In upper left corner!", "Hi");
                                    if(!sp.GetStoredBool("CornerCheckActive")) {
                                        //添加代码到此处,然后注释或删除下方的sp.MessageBox
                                        sp.StoreBool("CornerCheckActive", true);
                                        sp.MessageBox("In upper left corner!", "Hi");
                                    } 
                               } else if(mousePos.X == mouseScreen.Bounds.Left && mousePos.Y == mouseScreen.Bounds.Bottom - 1) {
                                    //左下角动作
                                    //sp.MessageBox("In lower left corner!", "Hi");
                                    if(!sp.GetStoredBool("CornerCheckActive")) {
                                        sp.SendVKey(vk.LWIN);
                                        sp.StoreBool("CornerCheckActive", true);
                                    } 
                               }  else {
                                    sp.StoreBool("CornerCheckActive", false);
                               }`
);

关显示屏
sp.WindowFromHandle(new IntPtr(0xffff)).PostMessageObj(0x112, 0xf170, 2);

任务窗口
sp.SendModifiedVKeys([vk.LWIN], [vk.TAB]);

隐藏其他窗口
sp.SendModifiedVKeys([vk.LWIN], [vk.HOME]);