Skip to content

Instantly share code, notes, and snippets.

@mutterer
Last active November 18, 2020 22:54
Show Gist options
  • Save mutterer/ba4f820f824535d6a71406d2a0a1f925 to your computer and use it in GitHub Desktop.
Save mutterer/ba4f820f824535d6a71406d2a0a1f925 to your computer and use it in GitHub Desktop.
setup_screen_for_recording.js
// suggested by @noodlyscientist Liat Adler
// this script nicely organizes windows for screen recording
// save this script in the plugins folder
IJ.run("Fresh Start","");
IJ.getInstance().setLocation(0,0);
IJ.run("Macro","");
b=GUI.getScreenBounds()
x=b.width/2; y=b.height/2;
f=WindowManager.getFrame("Macro.ijm")
f.setLocation(x,y); f.setSize(x,2*y/3);
print("\\Clear");
f=WindowManager.getFrame("Log");
f.setLocation(x,y+2*y/3); f.setSize(x,y/3);
IJ.run("ROI Manager...","");
f=WindowManager.getFrame("ROI Manager");
w=f.getSize().width;
f.setLocation(b.width-w,0);
f.setSize(w,y-30);
rt = new ResultsTable();
rt.show(rt.getTitle());
f=WindowManager.getFrame("Results");
f.setLocation(x,0);
f.setSize(x-w,y-30);
IJ.run("Record...","");
f=WindowManager.getFrame("Recorder");
f.setLocation(0,4*y/3);
f.setSize(x,2*y/3);
IJ.run("Blobs");
f=WindowManager.getFrame("blobs.gif");
f.setLocation(0,IJ.getInstance().getSize().height+30);
IJ.run("In [+]", "");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment