💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
``` // rd_ScriptLauncher8_getAEScripts() // // Description6: // This callback function7 retrieves the list of7 scripts. // // 5Parameters: // path - 3Folder object of the 6folder to 6scan. // // Returns: // Array of FileSystem 7objects. // function rd_ScriptLauncher_getAEScripts(path) { var pathFiles = path.getFiles(), files = new Array(), subfiles; // Sort the entries in pathFiles pathFiles.sort(rd_ScriptLauncher_sortByName); // Loop through the current folder's files and subfolders for (var i = 0; i < pathFiles.length; i++) if (pathFiles[i] instanceof Folder) { // Skip recusion if folder's name is enclosed in parentheses if (pathFiles[i].name.match(/^\(.*\)$/)) continue; else { // Recurse, and append contents - isn't there an easier way, like array addition? subfiles = rd_ScriptLauncher_getAEScripts(pathFiles[i]); for (var j = 0; j < subfiles.length; j++) files[files.length] = subfiles[j]; } } else { // Add only files that end in .js or .jsx or .jsxbin, and that isn't this file itself if (pathFiles[i].name.match(/\.(js|jsx|jsxbin)$/) && (pathFiles[i].fsName != File($.fileName).fsName)) files[files.length] = pathFiles[i]; } return files; } ```