/* More information about the Olympus image plugin can be found here: https://imagej.net/OlympusImageJPlugin The installation Manual is here: http://www.olympus-lifescience.com/OlympusImageJPlugin/OlympusViewer_Win */ macro "Olympus Drag'nDrop Importer" { pluginFound = checkForPlugin("Olympus_Viewer.jar"); if (pluginFound) run("DragDrop"); else showMessage("Olympus viewer plugin cannot be found. It can be downloaded from http://www.olympus-lifescience.com/OlympusImageJPlugin/OlympusViewer_Win"); } function checkForPlugin(pluginName) { /* v161102 changed to true-false v180831 some cleanup v210429 Expandable array version v220510 Looks for both class and jar if no extension is given v220818 Mystery issue fixed, no longer requires restoreExit */ pluginCheck = false; if (getDirectory("plugins") == "") print("Failure to find any plugins!"); else { pluginDir = getDirectory("plugins"); if (lastIndexOf(pluginName,".")==pluginName.length-1) pluginName = substring(pluginName,0,pluginName.length-1); pExts = newArray(".jar",".class"); knownExt = false; for (j=0; j