0% found this document useful (0 votes)
37 views1 page

Startup Macros

This document contains macros and tools that are automatically installed when ImageJ starts up. It defines macros for the Developer Menu, drawing tools, and a popup menu. It also contains an example of creating a custom command with a keyboard shortcut.

Uploaded by

Daniel Mateus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views1 page

Startup Macros

This document contains macros and tools that are automatically installed when ImageJ starts up. It defines macros for the Developer Menu, drawing tools, and a popup menu. It also contains an example of creating a custom command with a keyboard shortcut.

Uploaded by

Daniel Mateus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

// "StartupMacros"

// The macros and tools in this file ("StartupMacros.txt") are


// automatically installed in the Plugins>Macros submenu and
// in the toolbar when ImageJ starts up.

// The "AutoRun" macro has been replaced by the Edit>Options>Startup command.

macro "Developer Menu Built-in Tool" {}


macro "Brush Built-in Tool" {}
macro "Flood Filler Built-in Tool" {}
macro "Arrow Built-in Tool" {}

var pmCmds = newMenu("Popup Menu",


newArray("Help...", "Rename...", "Duplicate...", "Original Scale",
"Paste Control...", "-", "Record...", "Capture Screen ", "Monitor
Memory...",
"List Commands...", "Control Panel...", "Startup Macros...", "Search..."));

macro "Popup Menu" {


cmd = getArgument();
if (cmd=="Help...")
showMessage("About Popup Menu",
"To customize this menu, edit the line that starts with\n\"var
pmCmds\" in ImageJ/macros/StartupMacros.txt.");
else
run(cmd);
}

macro "-" {} //menu divider

macro "About Startup Macros..." {


path = getDirectory("macros")+"About Startup Macros";
if (!File.exists(path))
exit("\"About Startup Macros\" not found in ImageJ/macros/.");
open(path);
}

// This example macro demonstrates how to create a


// custom command with a keyboard shortcut.
//macro "Save As JPEG... [j]" {
// quality = call("ij.plugin.JpegWriter.getQuality");
// quality = getNumber("JPEG quality (0-100):", quality);
// run("Input/Output...", "jpeg="+quality);
// saveAs("Jpeg");
//}

You might also like