Ask for text, pass to terminal, in Automator I am trying to create a simple Automator service to quickly change metadata on photos. I would like to be able to select x amount of files, run the service, and get a popup that asks for the f-number I want to change to:

At the moment this is set up to grab selected files in finder, and run the following terminal command:

exiftool -FNumber="1.8" -overwrite_original_in_place "$@"




(exiftool us an application used to edit metadata)

This command works, but the FNumber is hardcoded to 1.8. I would like to be able to dynamically specify the f-number via the "Ask for text" command. However, I don't know how I can ask for text and use the selected files as inputs at the same time. Does anyo
If you're not particularly bound to using Automator's "Ask for text" command, you could do this:

In your service, have the action item be "Run AppleScript" rather than "Run Shell Script"

Use this AppleScript:

on run {input, parameters}
    set myvar to text returned of (display dialog "What F-stop do you want to set?" default answer "1.8")
    repeat with myitem in input
        set myscript to "exiftool -FNumber=\"" &amp; myvar &amp; "\" -overwrite_original_in_place \"" &amp; (POSIX path of myitem) &amp; "\""
        do shell script myscript
    end repeat
end run