// This macro demonstrates how to pass variables // to commands called using run() by adding "&" // variable names. The macro creates an image, sets // the scale to 150 pixels/mm, rotates 25 degrees, and // saves in Analyze format in the user's home directory. name = "Test Image"; directory = getDirectory("home"); width = 400; height = 300; scale = 150; // 150 pixels/mm unit = "mm"; angle = 25; newImage(name, "8-bit ramp", width, height, 1); run("Set Scale...", "distance=&scale known=1 pixel=1 unit=&unit"); run("Rotate... ", "angle=&angle interpolation=Bicubic"); path = directory+name; run("Analyze 7.5...", "save=&path");