|
Thanks to Wayne, the function IJ.getToolName(), released with version
1.43l solved the question.
Here is an example using that function:
// IJ.getToolName() Demo
// This macro demonstrates the use of the IJ.getToolName() function.
requires("1.43l");
setTool("point");
requiredTool="multipoint"; // name of the required tool
waitForUser("Please select the "+requiredTool+" tool.");
if (IJ.getToolName()!=requiredTool) {
showMessage("The "+ IJ.getToolName() +" tool is selected. Switching
to "+requiredTool+", which this macro requires.");
setTool(requiredTool);
}
//
Regards,
Roberto
|