latrinity.blogg.se

Clipboard dialog box launcher.
Clipboard dialog box launcher.













Rd_ScriptLauncherData.scriptPath = new Folder(("redefinery", "rd_ScriptLauncher_scriptPath")) If (("redefinery", "rd_ScriptLauncher_scriptPath")) Check if the script path variable is stored in the settings use if so Item = ("item", fullName) Īlert(rd_ScriptLauncher_localize(rd_ScriptLauncherData.strMinAE80), rd_ScriptLauncherData.scriptName) IconFile = File(fullName.replace(/.(js|jsx|jsxbin)$/,".png")) įullName = fullName.substr(rd_+1) (and folder separator, assumed as one character)įullName = rd_ Build the array of script names used in the UI, but strip off the base path Rd_ScriptLauncherData.scriptFiles = rd_ScriptLauncher_getAEScripts(rd_ScriptLauncherData.scriptPath) įor (var i = 0 i < rd_ i++) Load the scripts from the Scripts folder hierarchy This function builds the contents of the scripts list.įunction rd_ScriptLauncher_buildScriptsList(palette) Subfiles = rd_ScriptLauncher_getAEScripts(pathFiles) įor (var j = 0 j < subfiles.length j++) Recurse, and append contents - isn't there an easier way, like array addition? Skip recusion if folder's name is enclosed in parentheses

clipboard dialog box launcher.

Loop through the current folder's files and subfoldersįor (var i = 0 i < pathFiles.length i++) PathFiles.sort(rd_ScriptLauncher_sortByName) Var pathFiles = path.getFiles(), files = new Array(), subfiles path - Folder object of the folder to scan.įunction rd_ScriptLauncher_getAEScripts(path)

clipboard dialog box launcher.

This callback function retrieves the list of scripts. If (a.name.toLowerCase() b.name.toLowerCase()) Integer controlling the array sort function.įunction rd_ScriptLauncher_sortByName(a, b) Custom array sort function for sorting File and Folder objects by their names. ScriptText += scriptFile.readln() + "\r\n" Load the script's contents into a string This callback function runs the selected script. This callback function rescans the current Scripts folder andįunction rd_ScriptLauncher_doRefreshList() Store the path in the settings so the user doesn't have to set it the next timeĪpp.settings.saveSetting("redefinery", "rd_ScriptLauncher_scriptPath", folder.fsName) Rd_ScriptLauncherData.scriptPath = folder Var folder = lectDialog("Locate AE's Scripts folder") This callback function asks the user to locate the Scripts folder.įunction rd_ScriptLauncher_doSelectFolder() onClick = rd_ScriptLauncher_doRefreshList onClick = rd_ScriptLauncher_doSelectFolder Rd_ScriptLauncherData.strScriptsFolder = Rd_ScriptLauncherData.scriptFiles = new Array()

clipboard dialog box launcher.

Rd_ScriptLauncherData.scriptTitle = rd_ScriptLauncherData.scriptName + " v2.3" Rd_ScriptLauncherData.scriptName = "rd: Script Launcher" Var rd_ScriptLauncherData = new Object() // Store globals in an object















Clipboard dialog box launcher.