repeat actionscript in Sierra?
If I understood your question, you do not want it prompting for the files to act upon and you want it to act upon all specified files, the following will do that.


In Automator, create a new Workflow. (Automator > File > New > Workflow)
Add a Get Specified Finder Items action.


Add the items you want to be in the Get Specified Finder Items action. The items can be files and or folders.

Add a Get Folder Contents action.


This is to handle if an item in the Get Specified Finder Items action is a Folder.

Add a Run AppleScript action.


Add the following AppleScript code to replace the default code.



on run {input, parameters}
    set list_of_files to input
    repeat with this_file in list_of_files
        -- indicate the proportions for the pad area
        set H_proportion to 1
        set V_proportion to 1
        try
            tell application "Image Events"
                -- start the Image Events application
                launch
                -- open the image file
                set this_image to open this_file
                -- get dimensions of the image
                copy dimensions of this_image to {W, H}
                -- calculate pad dimensions
                if H_proportion is greater than V_proportion then
                    set the new_W to (H * H_proportion) / V_proportion
                    set pad_dimensions to {new_W, H}
                else
                    set the new_H to (W * V_proportion) / H_proportion
                    set pad_dimensions to {W, new_H}
                end if
                -- perform action
                pad this_image to dimensions pad_dimensions with pad color {65535, 65535, 65535}
                -- save the changes
                save this_image with icon
                -- purge the open image data
                close this_image
            end tell
        on error error_message
            display dialog error_message
        end try
    end repeat
    return input
end run