macro "Polygon Tool -C00bB12P51f1f2b6b7eafb1b151451" { requires("1.45n"); size = 6/getZoom; x = newArray(2000); y = newArray(2000); getCursorLoc(x2, y2, z2, flags); x[0] = x2; y[0] = y2; x[1] = x2; y[1] = y2; n = 2; Overlay.drawRect(x[0]-size, y[0]-size, size*2, size*2); Overlay.show; while (flags&16!=0) getCursorLoc(x2, y2, z2, flags); while (flags&7==0) { getCursorLoc(x2, y2, z2, flags); //print(x2, y2, flags); if (flags&16!=0) { while (flags&16!=0) getCursorLoc(x2, y2, z2, flags); if (x2>x[0]-size && x2y[0]-size && y20) Overlay.removeSelection(Overlay.size-1); exit; } n++; } if (x[n-1]!=x2 && y[n-1]!=y2) { x[n-1] = x2; y[n-1] = y2; makeSelection("freeline", x, y, n); } wait(10); } }