ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` // 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; } ```