Running shell commands with Automator: how to create a droplet launching an "exec" command?

by Kurt UXD   Last Updated October 07, 2018 04:12 AM

I need to create a automator application that launches the following exec command, whenever a image file is dropped onto it (the exec print the image files with some printing params).

exec('lpr -o ImageableArea=DS_8x6 -o PageRegion=DS_8x12 -o
PageSize=DS_8x12 -o media=DS_8x12 '.$fullPathOfTheImageFile);

How can I create this application? I can't go beyond this point: enter image description here

Answers 1

Change input type in the upper right of the Run Shell Script block to as arguments. Then you can get the result of the previous block like it was passed to a shell script as argument. Example:

lpr -o ImageableArea=DS_8x6 -o PageRegion=DS_8x12 -o
PageSize=DS_8x12 -o media=DS_8x12 $1

enter image description here

April 07, 2014 17:22 PM

Related Questions

Translate shell script not working within Automator

Updated January 27, 2017 14:05 PM

Run zsh alias via automator?

Updated May 26, 2017 16:12 PM