/* File created by ImageJ on 2017.09.10 21:27:31 * * This toolset contains Menu Tools listing in a dropdown menu all the * executable files present in subfolders of the ImageJ/plugins directory. * IJ executable files are all '.txt', '.class' and '.jar' files with at * least one underscore in the filename, and all '.ijm' and '.js' files. * * Edit the two lines below '// Settings:' to change which files should be * listed (e.g. you can exclude .jar files implementing multiple commands * via a plugins.config file) * * For any Menu Tool, hold down 'Shift' while selecting a '.ijm' or '.js' * file in the dropdown list and ImageJ will open that macro or script; */ // Settings: var AllowedFileExtensions= newArray('class','txt','ijm','jar','js'); var IgnoreFilenamesContaining= newArray('$','//','//','//'); // Macros: macro 'Unused Tool -' {} var aList= getPluginList('Scripts/SMM'); var aCmds= newMenu('Scripts Menu Tool',aList); macro 'Scripts Menu Tool - C555T1d13 T9d13 D1eD2dD1fD2eD3cD3dD4bD4cD5aD5bD6aD14D15D16D17D18D19D1aD1bD1cD1dD20D21D22D23D24D25D26D27D28D29D2aD2bD2cD2fD33D34D35D36D37D38D39D3aD3bD3eD3fD47D48D49D4aD4dD4eD4fD5cD5dD5eD5fD6bD6cD6dD6eD6fD7dD7eD7fD8dD8eD8fD9dD9eD9fDaeDafDbeDbfDcfDdf' { cmd= getArgument(); if (cmd!='-') run(cmd); } // Functions: function getPluginList(subfolder) { dir= getDirectory('plugins')+ subfolder +File.separator; list= newArray(''+ subfolder +' not found','in the plugins directory...'); if (!File.exists(dir)) return list; rawlist= getFileList(dir); count= 0; for (i=0; i< rawlist.length; i++) { isMacro= (getVersion>='1.41n') && (endsWith(rawlist[i],'.ijm') || endsWith(rawlist[i],'.js')); if (indexOf(rawlist[i], '_')==-1 && !isMacro) rawlist[i]='-'; for (h=0; h