//Visit fields of large images on small screens. //N. Vischer 04.10.13 15:26 //Defines a matrix of fields (rows * columns) which then can be visited //sequentially at desired magnification (zoom in %) by a single keystroke [shortcut F]. //After last field, program returns to normal view, showing the entire image. //-> Watch blue overview rectangle (top left) to see which field is active //-> or choose "Circles for Orientation[o]" to show ovals for 500 ms. var columns=1, rows=2, zoom = 70;//define behaviour here var field = 0; macro "Visit next Field [f]"{ if (field >= columns * rows){ run("Original Scale"); field = 0; setLocation(0, 90); return; } setLocation(0, 0); col = field%columns; row = floor(field/columns); fieldWidth = getWidth/columns; fieldHeight = getHeight/rows; x = (col + 0.5)* fieldWidth; y = (row + 0.5)* fieldHeight; run("Set... ", "zoom=&zoom x=&x y=&y"); field++; } macro "Circles for Orientation [o]"{ makeOval(0, 0, getWidth, getHeight); setKeyDown("alt"); makeOval(getWidth *0.25, getHeight * 0.25, getWidth *0.5, getHeight * 0.5); wait(500); run("Select None"); }