//正则匹配图层名并选中 v1.0.0 2021-07-14
//Raymond Yan 2021 (RaymondClr@outlook.com / QQ: 1107677019)

var win = new Window("palette { \
        A: Button {text: '选中' } \
    }");
win.show();

win.A.onClick = function () {
    var activeItem = app.project.activeItem;
    if (!activeItem) return;
    var layers = activeItem.layers;
    for (var i = 1, l = layers.length; i <= l; i++) {
        var currentLayer = layers[i];
        currentLayer.selected = /^图层 *(\d+)?$/.test(currentLayer.name);
    }
};

Leave a Reply

Your email address will not be published.

请下载到本地观看!因为pdf是用的阿里云盘预览,可能部分字体加载不了。

请安装油猴脚本,并下载月离的万事屋脚本

请在右上角三个点 - 下载管理 - 找到刚才的文件,选择允许下载。 或者换个浏览器
echo