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

屏幕边缘滚动调节亮度、声音、浏览器标签页切换、程序切换

屏幕左边缘调节亮度,任务栏调节声音,屏幕右边缘切换程序,浏览器标签栏切换

默认设置滚动距离屏幕左右边缘20和25px

添加到全局动作-鼠标事件-鼠标滚轮 需要勾选启动和吞掉

重要:注释默认代码备份

下载亮度插件https://www.strokesplus.net/files/ScreenBrightness.dll

插件-添加插件

插件会自动复制到S+安装文件夹,不需要手动复制过去,另外此插件调节亮度时不会显示亮度条状态,如果需要亮度条可以配合一款软件快捷键调节(因为无法识别键盘Fn)

var mouseLocation = sp.GetCurrentMousePoint();
var currentScreen = Screen.FromPoint(mouseLocation);
if(mouseLocation.Y >= currentScreen.Bounds.Bottom - 40) {
    //Mouse is at edge of screen
    if(wheel.Delta > 0) {
        sp.SendVKey(vk.VOLUME_UP);
    } else {
        sp.SendVKey(vk.VOLUME_DOWN);
    }
} else if(mouseLocation.Y <= currentScreen.Bounds.Top + 35) {
   if(wheel.Window.Process.MainModule.ModuleName == "chrome.exe" || wheel.Window.Process.MainModule.ModuleName == "msedge.exe" ||
        wheel.Window.Process.MainModule.ModuleName == "MicrosoftEdge.exe" || wheel.Window.Process.MainModule.ModuleName == "Firefox.exe") {
       if(wheel.Delta > 0) {
            //mouse wheel scrolled up
            sp.SendModifiedVKeys([vk.LCONTROL,vk.LSHIFT], [vk.TAB]);
        } else {
            //mouse wheel scrolled down
            sp.SendModifiedVKeys([vk.LCONTROL], [vk.TAB]);
        }
    } else {
        sp.MouseWheel(wheel.Point, false, wheel.Delta); 
    }
} else if(mouseLocation.X <= currentScreen.Bounds.Left + 20) {
    if(wheel.Delta > 0){
        //scroll up, send 
        ScreenBrightness.ScreenBrightness.Adjust("10+");
    } else {
        //scroll down, send 
        ScreenBrightness.ScreenBrightness.Adjust("10-");
    }
} else if(mouseLocation.X >= currentScreen.Bounds.Right - 25) {
    if(wheel.Delta > 0) {
        //If Alt is down
        try { 
            if(sp.GetStoredBool("AltDown")) {
                sp.SendModifiedVKeys([vk.LSHIFT], [vk.TAB]);
            } else {
                sp.StoreBool("AltDown", true); 
                sp.SendAltDown();
                sp.Sleep(50);
                sp.SendModifiedVKeys([vk.LSHIFT], [vk.TAB]);
            }

            sp.CreateTimer("TimerAltDown", 800, 0, `sp.SendAltUp(); sp.DeleteTimer("TimerAltDown");`);
            sp.DeleteStoredBool("AltDown");

        } catch {}
    } else {
    //If Alt is down
        try { 
           if(sp.GetStoredBool("AltDown")) {
                sp.SendVKeyDown(vk.TAB);
                sp.Sleep(50);
                sp.SendVKeyUp(vk.TAB);

            } else {
            //First stroll, send Alt down
                sp.StoreBool("AltDown", true); 
                sp.SendAltDown();
                sp.Sleep(50);
                sp.SendVKeyDown(vk.TAB);
                sp.Sleep(50);
                sp.SendVKeyUp(vk.TAB);
            }

            sp.CreateTimer("TimerAltDown", 800, 0, `sp.SendAltUp(); sp.DeleteTimer("TimerAltDown");`);
            sp.DeleteStoredBool("AltDown");
        } catch {}
    }
} else {
    //Default, pass mouse wheel message onto the original control
    sp.MouseWheel(wheel.Point, false, wheel.Delta); 
}


1 Like