Macro Actions Not Recording

I have the following code which I modified from a few examples. This code will read in a .jpg from the specified directory, draw a line (makeLine(3, 1311, 2048, 1311)), and apply a Gaussian Blur. I used the Plugins-> Macros->Record to get the commands for those which was really easy. However, after the line and blur is applied the following steps were not recorded:

Find the peaks of the line using “FindPeaks [3]” (PeakFinderTool).

I would then like to “Show Marked Profile [4]”.

Which results in:

I would then like to save the list as a “.xls” file with the corresponding photo name (ex. 2-1.xls) and the photo with the displayed peaks.

I can’t seem to run the “FindPeaks [3]” and the “Show Marked Profile [4]” commands. I tried running the FindPeak Tool with the following:


But I get the following error:

Macro or Script not Found: PeakFinderTool

Any advice of help with the problems described above? Go easy this is my first macro!


input = getDirectory("Input File Path");
output = getDirectory("Output File Path");

suffix = ".jpg";  //only want to apply to .jpg images


function processFolder(input) {
    list = getFileList(input);
    for (i = 0; i < list.length; i++) {
        if(File.isDirectory(input + list[i]))   //if it's a directory, go to subfolder
            processFolder("" + input + list[i]);
        if(endsWith(list[i], suffix))   //if it's a .jpg image, process it
            processFile(input, output, list[i]);
        //if it's neither a .jpg nor a directory, do nothing

function processFile(input, output, file) {
    //here, you put the real processing
    print("Processing: " + input + file);

    open(input + file);  //open image

	makeLine(3, 1311, 2048, 1311);
	run("Gaussian Blur...", "sigma=4");

    //saveAs(" output + file +"_overlay.jpg");

    print("Saved to: " + output);

Hi @cameronkennedy9406

The peak finder is a macro tool itself and therefore not macro recordable. So far, there might be a possibility to go via [BAR scripting] ( from @tferr this includes the peak finder tool.