// This tool draws a line, then measures and labels it. macro "Line Length Tool -C00bL1de0L1ee1" { getCursorLoc(x, y, z, flags); xstart = x; ystart = y; x2=x; y2=y; while (true) { getCursorLoc(x, y, z, flags); if (flags&16==0) { dx=x2-xstart; dy=y2-ystart; if (selectionType==5) { run("Measure"); run("Label"); run("Select None"); } exit; } if (x!=x2 || y!=y2) makeLine(xstart, ystart, x, y); x2=x; y2=y; wait(10); }; } }