stroke-exporer

Posted searchor

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了stroke-exporer相关的知识,希望对你有一定的参考价值。

win10

2列排列所有打开的explorer窗口

关闭全部explorer 窗口


function getExplorerWindows() {
    let wnds = sp.AllApplications();
    const windClass = "CabinetWClass";
    const proName = "explorer";
    let result = new Array();
    for(let i =0;i< wnds.Length;++i) {
        let cur = wnds[i];
        if(cur.Process.ProcessName == proName) {
            result.push(cur);
        }
    }
    return result;
}


function closeExporer() {
    let todo = getExplorerWindows();
    for(let i =0;i< todo.length;++i) {
        todo[i].SendClose()
    }
}

function sortExporer(windArray) {
    if(!!!windArray || windArray.length<1) return;
    const total = windArray.length;
    const curScreen = windArray[0].Screen;
    const sWidth = curScreen.WorkingArea.Width;
    const sHeight = curScreen.WorkingArea.Height;
    
    const cellW = Math.floor(sWidth/2);
    const cellH = Math.floor(sHeight/Math.floor((total+1)/2));


    let result = "";
    for(let i =0; i<total;++i) {
        let rect =   windArray[i].Rectangle;
        rect.Width =cellW;
        rect.Height = cellH;
        rect.X = (i%2)*cellW;
        rect.Y = Math.floor((i)/2.0)*cellH;
        windArray[i].Rectangle = rect;
    }
}


sortExporer(getExplorerWindows());

closeExporer();

以上是关于stroke-exporer的主要内容,如果未能解决你的问题,请参考以下文章

VSCode自定义代码片段——CSS选择器

谷歌浏览器调试jsp 引入代码片段,如何调试代码片段中的js

片段和活动之间的核心区别是啥?哪些代码可以写成片段?

VSCode自定义代码片段——.vue文件的模板

VSCode自定义代码片段6——CSS选择器

VSCode自定义代码片段——声明函数